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
- Variables
- type APIError
- type APIKey
- type APIKeysCreateParams
- type APIKeysListParams
- type APIKeysNamespace
- func (n *APIKeysNamespace) Create(ctx context.Context, params APIKeysCreateParams, opts ...RequestOption) (*CreatedAPIKey, error)
- func (n *APIKeysNamespace) List(ctx context.Context, params *APIKeysListParams, opts ...RequestOption) ([]APIKey, error)
- func (n *APIKeysNamespace) Revoke(ctx context.Context, params APIKeysRevokeParams, opts ...RequestOption) (*OK, error)
- func (n *APIKeysNamespace) Rotate(ctx context.Context, params APIKeysRotateParams, opts ...RequestOption) (*CreatedAPIKey, error)
- type APIKeysRevokeParams
- type APIKeysRotateParams
- type APIV1Client
- type AcceptInvitationRequest
- type AcceptInvitationResponse
- type AcceptInvitationResponseOrganization
- type AccessDecision
- type AccessDecisionConflict
- type AccessDecisionForbidden
- type AccessRequest
- type AccessRequestCatalog
- type AccessRequestCreate
- type AccessRequestsApproveParams
- type AccessRequestsCatalogParams
- type AccessRequestsCreateParams
- type AccessRequestsDenyParams
- type AccessRequestsListParams
- type AccessRequestsNamespace
- func (n *AccessRequestsNamespace) Approve(ctx context.Context, params AccessRequestsApproveParams, opts ...RequestOption) (*AccessRequest, error)
- func (n *AccessRequestsNamespace) Catalog(ctx context.Context, params *AccessRequestsCatalogParams, ...) (*AccessRequestCatalog, error)
- func (n *AccessRequestsNamespace) Create(ctx context.Context, params *AccessRequestsCreateParams, opts ...RequestOption) (*AccessRequest, error)
- func (n *AccessRequestsNamespace) Deny(ctx context.Context, params AccessRequestsDenyParams, opts ...RequestOption) (*AccessRequest, error)
- func (n *AccessRequestsNamespace) List(ctx context.Context, params *AccessRequestsListParams, opts ...RequestOption) ([]AccessRequest, error)
- func (n *AccessRequestsNamespace) Revoke(ctx context.Context, params AccessRequestsRevokeParams, opts ...RequestOption) (*AccessRequest, error)
- func (n *AccessRequestsNamespace) Withdraw(ctx context.Context, params AccessRequestsWithdrawParams, ...) (*OK, error)
- type AccessRequestsRevokeParams
- type AccessRequestsWithdrawParams
- type AccessRevokeConflict
- type AccessWithdrawConflict
- type Account
- type AccountDeleted
- type AccountDeletionPreview
- type AccountDetail
- type AccountDetailAccount
- type AccountTagCompliance
- type AccountsCreateParams
- type AccountsCreateRequest
- type AccountsCredentialsGetParams
- type AccountsCredentialsNamespace
- type AccountsCredentialsUpdateParams
- type AccountsCredentialsUpdateRequest
- type AccountsCredentialsUpdateResponse
- type AccountsDeleteParams
- type AccountsDetailParams
- type AccountsExportTerraformParams
- type AccountsListParams
- type AccountsNamespace
- func (n *AccountsNamespace) Create(ctx context.Context, params AccountsCreateParams, opts ...RequestOption) (*CreateAccountResponse, error)
- func (n *AccountsNamespace) Delete(ctx context.Context, params AccountsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *AccountsNamespace) Detail(ctx context.Context, params AccountsDetailParams, opts ...RequestOption) (*AccountDetail, error)
- func (n *AccountsNamespace) ExportTerraform(ctx context.Context, params AccountsExportTerraformParams, ...) (*TerraformExport, error)
- func (n *AccountsNamespace) List(ctx context.Context, params *AccountsListParams, opts ...RequestOption) ([]Account, error)
- func (n *AccountsNamespace) Resources(ctx context.Context, params AccountsResourcesParams, opts ...RequestOption) ([]Resource, error)
- func (n *AccountsNamespace) Sync(ctx context.Context, params AccountsSyncParams, opts ...RequestOption) (*SyncResponse, error)
- func (n *AccountsNamespace) Update(ctx context.Context, params AccountsUpdateParams, opts ...RequestOption) (*UpdatedAccount, error)
- type AccountsPluginsListParams
- type AccountsPluginsNamespace
- type AccountsPluginsPolicyTemplateParams
- type AccountsPreflightCreateParams
- type AccountsPreflightNamespace
- type AccountsPreflightPostOrgOrgIDAccountsIDPreflightParams
- type AccountsResourcesParams
- type AccountsSyncParams
- type AccountsSyncTypeCreateParams
- type AccountsSyncTypeNamespace
- type AccountsUpdateParams
- type ActiveTunnel
- type AgentSession
- type AgentSettings
- type AgentVMAccount
- type AgentsAccountsParams
- type AgentsNamespace
- type AgentsSessionsCreateParams
- type AgentsSessionsDeleteParams
- type AgentsSessionsDeleteResponse
- type AgentsSessionsListParams
- type AgentsSessionsNamespace
- func (n *AgentsSessionsNamespace) Create(ctx context.Context, params AgentsSessionsCreateParams, opts ...RequestOption) (*AgentSession, error)
- func (n *AgentsSessionsNamespace) Delete(ctx context.Context, params AgentsSessionsDeleteParams, opts ...RequestOption) (*AgentsSessionsDeleteResponse, error)
- func (n *AgentsSessionsNamespace) List(ctx context.Context, params *AgentsSessionsListParams, opts ...RequestOption) ([]AgentSession, error)
- func (n *AgentsSessionsNamespace) Open(ctx context.Context, params AgentsSessionsOpenParams, opts ...RequestOption) (*AgentsSessionsOpenResponse, error)
- func (n *AgentsSessionsNamespace) Reconcile(ctx context.Context, params AgentsSessionsReconcileParams, ...) (*AgentsSessionsReconcileResponse, error)
- type AgentsSessionsOpenParams
- type AgentsSessionsOpenResponse
- type AgentsSessionsReconcileParams
- type AgentsSessionsReconcileResponse
- type AgentsSettingsGetParams
- type AgentsSettingsNamespace
- type AgentsSettingsUpdateParams
- type AlertCondition
- type AlertDelivery
- type AlertDestination
- type AlertRule
- type AlertRuleInput
- type AlertRulesAdoptDefaultsParams
- type AlertRulesAdoptDefaultsResponse
- type AlertRulesDeliveriesAckParams
- type AlertRulesDeliveriesAckResponse
- type AlertRulesDeliveriesCancelParams
- type AlertRulesDeliveriesCancelRequest
- type AlertRulesDeliveriesCancelResponse
- type AlertRulesDeliveriesListParams
- type AlertRulesDeliveriesNamespace
- func (n *AlertRulesDeliveriesNamespace) Ack(ctx context.Context, params AlertRulesDeliveriesAckParams, ...) (*AlertRulesDeliveriesAckResponse, error)
- func (n *AlertRulesDeliveriesNamespace) Cancel(ctx context.Context, params *AlertRulesDeliveriesCancelParams, ...) (*AlertRulesDeliveriesCancelResponse, error)
- func (n *AlertRulesDeliveriesNamespace) List(ctx context.Context, params *AlertRulesDeliveriesListParams, ...) ([]AlertDelivery, error)
- type AlertRulesGetParams
- type AlertRulesNamespace
- func (n *AlertRulesNamespace) AdoptDefaults(ctx context.Context, params *AlertRulesAdoptDefaultsParams, ...) (*AlertRulesAdoptDefaultsResponse, error)
- func (n *AlertRulesNamespace) Get(ctx context.Context, params *AlertRulesGetParams, opts ...RequestOption) (*AlertRulesResponse, error)
- func (n *AlertRulesNamespace) Update(ctx context.Context, params *AlertRulesUpdateParams, opts ...RequestOption) (*AlertRulesUpdateResponse, error)
- type AlertRulesResponse
- type AlertRulesResponseAccounts
- type AlertRulesResponseMsTeamsWebhooks
- type AlertRulesResponseSlackChannels
- type AlertRulesUpdateParams
- type AlertRulesUpdateRequest
- type AlertRulesUpdateResponse
- type AlertSeverity
- type AlertTrigger
- type AllocationRule
- type AllocationRuleInput
- type AllocationRuleMatch
- type ApplyManifestRequest
- type ArtifactsListParams
- type ArtifactsListRequest
- type ArtifactsNamespace
- type AssociationRequest
- type AssociationsCreateParams
- type AssociationsLiteralParams
- type AssociationsNamespace
- type AttachRequest
- type AuditEntry
- type AuditLogsGetParams
- type AuditLogsNamespace
- type AuditResponse
- type AuthFactor
- type AuthNamespace
- type Bastion
- type BastionStatus
- type BastionsCreateParams
- type BastionsDeleteParams
- type BastionsListParams
- type BastionsNamespace
- func (n *BastionsNamespace) Create(ctx context.Context, params BastionsCreateParams, opts ...RequestOption) (*CreateBastionResponse, error)
- func (n *BastionsNamespace) Delete(ctx context.Context, params BastionsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *BastionsNamespace) List(ctx context.Context, params *BastionsListParams, opts ...RequestOption) ([]Bastion, error)
- type BillingCapacityCheckoutParams
- type BillingCapacityNamespace
- type BillingCheckoutParams
- type BillingNamespace
- func (n *BillingNamespace) Checkout(ctx context.Context, params *BillingCheckoutParams, opts ...RequestOption) (*StripeRedirectURL, error)
- func (n *BillingNamespace) Portal(ctx context.Context, params *BillingPortalParams, opts ...RequestOption) (*StripeRedirectURL, error)
- func (n *BillingNamespace) Status(ctx context.Context, params *BillingStatusParams, opts ...RequestOption) (*BillingStatus, error)
- type BillingPortalParams
- type BillingStatus
- type BillingStatusParams
- type BudgetAlertEvent
- type BudgetCostBasis
- type BudgetCostFilter
- type BudgetFull
- type BudgetInput
- type BudgetThreshold
- type BudgetWithStatus
- type BudgetWithStatusCurrentMonthEvents
- type BudgetWithStatusPlacements
- type BudgetsCreateParams
- type BudgetsDeleteParams
- type BudgetsEventsParams
- type BudgetsGetParams
- type BudgetsListParams
- type BudgetsNamespace
- func (n *BudgetsNamespace) Create(ctx context.Context, params BudgetsCreateParams, opts ...RequestOption) (*BudgetFull, error)
- func (n *BudgetsNamespace) Delete(ctx context.Context, params BudgetsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *BudgetsNamespace) Events(ctx context.Context, params BudgetsEventsParams, opts ...RequestOption) ([]BudgetAlertEvent, error)
- func (n *BudgetsNamespace) Get(ctx context.Context, params BudgetsGetParams, opts ...RequestOption) (*BudgetFull, error)
- func (n *BudgetsNamespace) List(ctx context.Context, params *BudgetsListParams, opts ...RequestOption) ([]BudgetWithStatus, error)
- func (n *BudgetsNamespace) Update(ctx context.Context, params BudgetsUpdateParams, opts ...RequestOption) (*BudgetFull, error)
- type BudgetsUpdateParams
- type CapacityCheckoutRequest
- type CapacitySlot
- type CapacityStatus
- type ChangeFreeze
- type ChangeFreezeBlocked
- type ChangeFreezeBlockedFreeze
- type ChangeFreezeInput
- type ChangeFreezeStatus
- type ChangeFreezesCreateParams
- type ChangeFreezesDeleteParams
- type ChangeFreezesEndParams
- type ChangeFreezesListParams
- type ChangeFreezesNamespace
- func (n *ChangeFreezesNamespace) Create(ctx context.Context, params ChangeFreezesCreateParams, opts ...RequestOption) (*ChangeFreeze, error)
- func (n *ChangeFreezesNamespace) Delete(ctx context.Context, params ChangeFreezesDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *ChangeFreezesNamespace) End(ctx context.Context, params ChangeFreezesEndParams, opts ...RequestOption) (*ChangeFreeze, error)
- func (n *ChangeFreezesNamespace) List(ctx context.Context, params *ChangeFreezesListParams, opts ...RequestOption) ([]ChangeFreeze, error)
- func (n *ChangeFreezesNamespace) Status(ctx context.Context, params *ChangeFreezesStatusParams, opts ...RequestOption) (*ChangeFreezeStatus, error)
- func (n *ChangeFreezesNamespace) Update(ctx context.Context, params ChangeFreezesUpdateParams, opts ...RequestOption) (*ChangeFreeze, error)
- type ChangeFreezesStatusParams
- type ChangeFreezesUpdateParams
- type ChangesAlertSettingsGetParams
- type ChangesAlertSettingsNamespace
- type ChangesAlertSettingsUpdateParams
- type ChangesGetParams
- type ChangesNamespace
- type ChangesResourceParams
- type ChildResourceRef
- type ChildTypeRef
- type ClientOption
- type CommitmentCoverage
- type CommitmentCoverageCurrency
- type CommitmentHolding
- type CommitmentPlanner
- type CommitmentPollFailure
- type CommitmentProviderUtilization
- type CommitmentRecommendation
- type CommitmentRejectedCell
- type CommitmentUnitAmount
- type CommitmentUtilization
- type CommitmentsFeed
- type CommitmentsGetParams
- type CommitmentsNamespace
- type ConfigApplyParams
- type ConfigExportParams
- type ConfigNamespace
- func (n *ConfigNamespace) Apply(ctx context.Context, params ConfigApplyParams, opts ...RequestOption) (*OrgConfigApplyResult, error)
- func (n *ConfigNamespace) Export(ctx context.Context, params *ConfigExportParams, opts ...RequestOption) (*OrgConfigDocument, error)
- func (n *ConfigNamespace) Plan(ctx context.Context, params ConfigPlanParams, opts ...RequestOption) (*OrgConfigPlan, error)
- type ConfigPlanParams
- type ConnectEnvDeployParams
- type ConnectEnvDeployRequest
- type ConnectNamespace
- func (n *ConnectNamespace) EnvDeploy(ctx context.Context, params ConnectEnvDeployParams, opts ...RequestOption) (*OK, error)
- func (n *ConnectNamespace) SecretExport(ctx context.Context, params ConnectSecretExportParams, opts ...RequestOption) (*OK, error)
- func (n *ConnectNamespace) Templates(ctx context.Context, params ConnectTemplatesParams, opts ...RequestOption) (*ConnectTemplatesResponse, error)
- type ConnectSecretExportParams
- type ConnectSecretExportRequest
- type ConnectTemplatesParams
- type ConnectTemplatesRequest
- type ConnectTemplatesResponse
- type CostAccountStatus
- type CostAccountStatusCostPollError
- type CostAccountStatusCostPollErrorHelpLink
- type CostAccountStatusCoverage
- type CostAlert
- type CostAlertEvent
- type CostAlertFilter
- type CostAlertInput
- type CostAlertsCreateParams
- type CostAlertsDeleteParams
- type CostAlertsEventsParams
- type CostAlertsEventsResponse
- type CostAlertsGetGetOrgOrgIDCostAlertsIDParams
- type CostAlertsGetGetParams
- type CostAlertsGetGetResponse
- type CostAlertsGetNamespace
- func (n *CostAlertsGetNamespace) Get(ctx context.Context, params *CostAlertsGetGetParams, opts ...RequestOption) (*CostAlertsGetGetResponse, error)
- func (n *CostAlertsGetNamespace) GetOrgOrgIDCostAlertsID(ctx context.Context, params CostAlertsGetGetOrgOrgIDCostAlertsIDParams, ...) (*CostAlert, error)
- type CostAlertsNamespace
- func (n *CostAlertsNamespace) Create(ctx context.Context, params CostAlertsCreateParams, opts ...RequestOption) (*CostAlert, error)
- func (n *CostAlertsNamespace) Delete(ctx context.Context, params CostAlertsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *CostAlertsNamespace) Events(ctx context.Context, params *CostAlertsEventsParams, opts ...RequestOption) (*CostAlertsEventsResponse, error)
- func (n *CostAlertsNamespace) Update(ctx context.Context, params CostAlertsUpdateParams, opts ...RequestOption) (*CostAlert, error)
- type CostAlertsUpdateParams
- type CostAnomaly
- type CostAnomalySettings
- type CostAnomalySettingsView
- type CostBasis
- type CostCentre
- type CostCentreInput
- type CostCentresCreateParams
- type CostCentresDeleteParams
- type CostCentresListParams
- type CostCentresNamespace
- func (n *CostCentresNamespace) Create(ctx context.Context, params CostCentresCreateParams, opts ...RequestOption) (*CostCentre, error)
- func (n *CostCentresNamespace) Delete(ctx context.Context, params CostCentresDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *CostCentresNamespace) List(ctx context.Context, params *CostCentresListParams, opts ...RequestOption) ([]CostCentre, error)
- func (n *CostCentresNamespace) Update(ctx context.Context, params CostCentresUpdateParams, opts ...RequestOption) (*CostCentre, error)
- type CostCentresRulesCreateParams
- type CostCentresRulesDeleteParams
- type CostCentresRulesListParams
- type CostCentresRulesNamespace
- func (n *CostCentresRulesNamespace) Create(ctx context.Context, params CostCentresRulesCreateParams, ...) (*AllocationRule, error)
- func (n *CostCentresRulesNamespace) Delete(ctx context.Context, params CostCentresRulesDeleteParams, ...) (*OK, error)
- func (n *CostCentresRulesNamespace) List(ctx context.Context, params *CostCentresRulesListParams, opts ...RequestOption) ([]AllocationRule, error)
- func (n *CostCentresRulesNamespace) Swap(ctx context.Context, params CostCentresRulesSwapParams, opts ...RequestOption) ([]AllocationRule, error)
- func (n *CostCentresRulesNamespace) Update(ctx context.Context, params CostCentresRulesUpdateParams, ...) (*AllocationRule, error)
- type CostCentresRulesSwapParams
- type CostCentresRulesUpdateParams
- type CostCentresUpdateParams
- type CostChangeCadence
- type CostChangeDirection
- type CostChargeType
- type CostDateRange
- type CostDimension
- type CostDimensionValues
- type CostEstimate
- type CostEstimateLineItem
- type CostEstimateRequest
- type CostExport
- type CostExportDestination
- type CostExportFilter
- type CostExportInput
- type CostExportObject
- type CostExportQuery
- type CostExportRunResult
- type CostExportsCreateParams
- type CostExportsDeleteParams
- type CostExportsGetParams
- type CostExportsListParams
- type CostExportsNamespace
- func (n *CostExportsNamespace) Create(ctx context.Context, params CostExportsCreateParams, opts ...RequestOption) (*CostExport, error)
- func (n *CostExportsNamespace) Delete(ctx context.Context, params CostExportsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *CostExportsNamespace) Get(ctx context.Context, params CostExportsGetParams, opts ...RequestOption) (*CostExport, error)
- func (n *CostExportsNamespace) List(ctx context.Context, params *CostExportsListParams, opts ...RequestOption) ([]CostExport, error)
- func (n *CostExportsNamespace) Run(ctx context.Context, params CostExportsRunParams, opts ...RequestOption) (*CostExportRunResult, error)
- func (n *CostExportsNamespace) Update(ctx context.Context, params CostExportsUpdateParams, opts ...RequestOption) (*CostExport, error)
- type CostExportsRunParams
- type CostExportsUpdateParams
- type CostFilter
- type CostGraphConfig
- type CostPushRequest
- type CostPushResponse
- type CostQueryRequest
- type CostQueryResponse
- type CostQuerySeries
- type CostReport
- type CostReportFilter
- type CostReportFolder
- type CostReportFolderInput
- type CostReportFoldersCreateParams
- type CostReportFoldersDeleteParams
- type CostReportFoldersListParams
- type CostReportFoldersNamespace
- func (n *CostReportFoldersNamespace) Create(ctx context.Context, params CostReportFoldersCreateParams, ...) (*CostReportFolder, error)
- func (n *CostReportFoldersNamespace) Delete(ctx context.Context, params CostReportFoldersDeleteParams, ...) (*OK, error)
- func (n *CostReportFoldersNamespace) List(ctx context.Context, params *CostReportFoldersListParams, ...) ([]CostReportFolder, error)
- func (n *CostReportFoldersNamespace) Update(ctx context.Context, params CostReportFoldersUpdateParams, ...) (*CostReportFolder, error)
- type CostReportFoldersUpdateParams
- type CostReportInput
- type CostReportNotificationsListParams
- type CostReportNotificationsNamespace
- type CostReportPlacement
- type CostReportRunResult
- type CostReportsCreateParams
- type CostReportsDeleteParams
- type CostReportsGetParams
- type CostReportsListParams
- type CostReportsNamespace
- func (n *CostReportsNamespace) Create(ctx context.Context, params CostReportsCreateParams, opts ...RequestOption) (*CostReport, error)
- func (n *CostReportsNamespace) Delete(ctx context.Context, params CostReportsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *CostReportsNamespace) Get(ctx context.Context, params CostReportsGetParams, opts ...RequestOption) (*CostReport, error)
- func (n *CostReportsNamespace) List(ctx context.Context, params *CostReportsListParams, opts ...RequestOption) ([]CostReport, error)
- func (n *CostReportsNamespace) Run(ctx context.Context, params CostReportsRunParams, opts ...RequestOption) (*CostReportRunResult, error)
- func (n *CostReportsNamespace) Update(ctx context.Context, params CostReportsUpdateParams, opts ...RequestOption) (*CostReport, error)
- type CostReportsNotificationsCreateParams
- type CostReportsNotificationsDeleteParams
- type CostReportsNotificationsListParams
- type CostReportsNotificationsNamespace
- func (n *CostReportsNotificationsNamespace) Create(ctx context.Context, params CostReportsNotificationsCreateParams, ...) (*ReportNotification, error)
- func (n *CostReportsNotificationsNamespace) Delete(ctx context.Context, params CostReportsNotificationsDeleteParams, ...) (*OK, error)
- func (n *CostReportsNotificationsNamespace) List(ctx context.Context, params CostReportsNotificationsListParams, ...) ([]ReportNotification, error)
- func (n *CostReportsNotificationsNamespace) Send(ctx context.Context, params CostReportsNotificationsSendParams, ...) (*ReportNotificationSendResult, error)
- func (n *CostReportsNotificationsNamespace) Targets(ctx context.Context, params CostReportsNotificationsTargetsParams, ...) (*ReportDeliveryTargets, error)
- func (n *CostReportsNotificationsNamespace) Update(ctx context.Context, params CostReportsNotificationsUpdateParams, ...) (*ReportNotification, error)
- type CostReportsNotificationsSendParams
- type CostReportsNotificationsTargetsParams
- type CostReportsNotificationsUpdateParams
- type CostReportsRunParams
- type CostReportsUpdateParams
- type CostSeriesPoint
- type CostsAnomaliesParams
- type CostsAnomaliesResponse
- type CostsAnomalySettingsGetParams
- type CostsAnomalySettingsNamespace
- type CostsAnomalySettingsUpdateParams
- type CostsDimensionsParams
- type CostsNamespace
- func (n *CostsNamespace) Anomalies(ctx context.Context, params *CostsAnomaliesParams, opts ...RequestOption) (*CostsAnomaliesResponse, error)
- func (n *CostsNamespace) Dimensions(ctx context.Context, params CostsDimensionsParams, opts ...RequestOption) (*CostDimensionValues, error)
- func (n *CostsNamespace) Query(ctx context.Context, params CostsQueryParams, opts ...RequestOption) (*CostQueryResponse, error)
- func (n *CostsNamespace) Rows(ctx context.Context, params CostsRowsParams, opts ...RequestOption) (*CostPushResponse, error)
- func (n *CostsNamespace) Showback(ctx context.Context, params *CostsShowbackParams, opts ...RequestOption) (*ShowbackReport, error)
- func (n *CostsNamespace) Status(ctx context.Context, params *CostsStatusParams, opts ...RequestOption) (*CostsStatusResponse, error)
- func (n *CostsNamespace) Untagged(ctx context.Context, params *CostsUntaggedParams, opts ...RequestOption) (*UntaggedSpendReport, error)
- type CostsQueryParams
- type CostsRowsParams
- type CostsShowbackParams
- type CostsStatusParams
- type CostsStatusResponse
- type CostsUntaggedParams
- type CreateAPIKeyRequest
- type CreateAccountRequest
- type CreateAccountResponse
- type CreateAccountResponseSyncError
- type CreateAgentSession
- type CreateBastionRequest
- type CreateBastionResponse
- type CreateConfigRequest
- type CreateJiraIssueInput
- type CreateJiraIssueResult
- type CreateJiraIssueResultIssue
- type CreateLinearIssueInput
- type CreateLinearIssueResult
- type CreateLinearIssueResultIssue
- type CreateOrgRequest
- type CreatePricingRequest
- type CreatePricingRequestSizes
- type CreateResourceRequest
- type CreateResourceResponse
- type CreateWidgetRequest
- type CreatedAPIKey
- type CredentialExport
- type CredentialExportFields
- type CredentialField
- type CredentialFieldHelpLink
- type CredentialFieldRegion
- type CredentialFormat
- type CredentialHygieneGetParams
- type CredentialHygieneNamespace
- type CreditBurndown
- type CreditPollFailure
- type CreditPot
- type CreditsGetParams
- type CreditsNamespace
- type CurrencyConfig
- type CurrencyGetParams
- type CurrencyNamespace
- type CurrencyRatesDeleteParams
- type CurrencyRatesDeleteResponse
- type CurrencyRatesNamespace
- type CurrencyRatesUpdateParams
- type CurrencySettings
- type CurrencyUpdateParams
- type CustomGraphCheckRequest
- type CustomGraphCheckResult
- type CustomGraphCheckResultDiagnostics
- type CustomGraphFull
- type CustomGraphInput
- type CustomGraphRenderRequest
- type CustomGraphRenderResult
- type CustomGraphRenderResultLogs
- type CustomGraphSummary
- type CustomGraphUpdate
- type CustomGraphsCheckParams
- type CustomGraphsCreateParams
- type CustomGraphsDeleteParams
- type CustomGraphsGetParams
- type CustomGraphsListParams
- type CustomGraphsNamespace
- func (n *CustomGraphsNamespace) Check(ctx context.Context, params CustomGraphsCheckParams, opts ...RequestOption) (*CustomGraphCheckResult, error)
- func (n *CustomGraphsNamespace) Create(ctx context.Context, params CustomGraphsCreateParams, opts ...RequestOption) (*CustomGraphFull, error)
- func (n *CustomGraphsNamespace) Delete(ctx context.Context, params CustomGraphsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *CustomGraphsNamespace) Get(ctx context.Context, params CustomGraphsGetParams, opts ...RequestOption) (*CustomGraphFull, error)
- func (n *CustomGraphsNamespace) List(ctx context.Context, params *CustomGraphsListParams, opts ...RequestOption) ([]CustomGraphSummary, error)
- func (n *CustomGraphsNamespace) Render(ctx context.Context, params CustomGraphsRenderParams, opts ...RequestOption) (*CustomGraphRenderResult, error)
- func (n *CustomGraphsNamespace) Typings(ctx context.Context, params *CustomGraphsTypingsParams, opts ...RequestOption) (io.ReadCloser, error)
- func (n *CustomGraphsNamespace) Update(ctx context.Context, params CustomGraphsUpdateParams, opts ...RequestOption) (*CustomGraphFull, error)
- type CustomGraphsRenderParams
- type CustomGraphsTypingsParams
- type CustomGraphsUpdateParams
- type DNSGetParams
- type DNSInventoryCounts
- type DNSInventoryResponse
- type DNSNamespace
- type DNSRecord
- type DNSRecordTarget
- type DNSSkippedNamespace
- type DNSTargetResource
- type DNSTargetService
- type DNSZone
- type Dashboard
- type DashboardFull
- type DashboardPin
- type DashboardWidget
- type DashboardWidgetFull
- type DashboardWidgetKind
- type DashboardWithPins
- type DashboardWorkflowPin
- type DashboardWorkflowPinMetrics
- type DashboardsCreateParams
- type DashboardsCreateRequest
- type DashboardsDefaultFullParams
- type DashboardsDefaultNamespace
- type DashboardsDeleteParams
- type DashboardsGetParams
- type DashboardsListParams
- type DashboardsNamespace
- func (n *DashboardsNamespace) Create(ctx context.Context, params DashboardsCreateParams, opts ...RequestOption) (*DashboardFull, error)
- func (n *DashboardsNamespace) Delete(ctx context.Context, params DashboardsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *DashboardsNamespace) Get(ctx context.Context, params DashboardsGetParams, opts ...RequestOption) (*DashboardWithPins, error)
- func (n *DashboardsNamespace) List(ctx context.Context, params *DashboardsListParams, opts ...RequestOption) ([]Dashboard, error)
- func (n *DashboardsNamespace) Probe(ctx context.Context, params DashboardsProbeParams, opts ...RequestOption) (map[string]ProbeStatus, error)
- func (n *DashboardsNamespace) Rename(ctx context.Context, params DashboardsRenameParams, opts ...RequestOption) (*OK, error)
- func (n *DashboardsNamespace) Reorder(ctx context.Context, params DashboardsReorderParams, opts ...RequestOption) (*OK, error)
- func (n *DashboardsNamespace) Unpin(ctx context.Context, params DashboardsUnpinParams, opts ...RequestOption) (*OK, error)
- func (n *DashboardsNamespace) ValidateTabs(ctx context.Context, params DashboardsValidateTabsParams, ...) (*ValidateTabsResponse, error)
- func (n *DashboardsNamespace) WorkflowPin(ctx context.Context, params DashboardsWorkflowPinParams, opts ...RequestOption) (*OK, error)
- func (n *DashboardsNamespace) WorkflowUnpin(ctx context.Context, params DashboardsWorkflowUnpinParams, ...) (*OK, error)
- type DashboardsPinCreateParams
- type DashboardsPinGetParams
- type DashboardsPinNamespace
- func (n *DashboardsPinNamespace) Create(ctx context.Context, params DashboardsPinCreateParams, opts ...RequestOption) (*OK, error)
- func (n *DashboardsPinNamespace) Get(ctx context.Context, params DashboardsPinGetParams, opts ...RequestOption) (*PinFull, error)
- func (n *DashboardsPinNamespace) Range(ctx context.Context, params DashboardsPinRangeParams, opts ...RequestOption) (*PinRangeResponse, error)
- type DashboardsPinRangeParams
- type DashboardsProbeParams
- type DashboardsRenameParams
- type DashboardsRenameRequest
- type DashboardsReorderParams
- type DashboardsUnpinParams
- type DashboardsValidateTabsParams
- type DashboardsWidgetsCreateParams
- type DashboardsWidgetsDeleteParams
- type DashboardsWidgetsNamespace
- func (n *DashboardsWidgetsNamespace) Create(ctx context.Context, params DashboardsWidgetsCreateParams, ...) (*DashboardWidgetFull, error)
- func (n *DashboardsWidgetsNamespace) Delete(ctx context.Context, params DashboardsWidgetsDeleteParams, ...) (*OK, error)
- func (n *DashboardsWidgetsNamespace) Update(ctx context.Context, params DashboardsWidgetsUpdateParams, ...) (*DashboardWidgetFull, error)
- type DashboardsWidgetsUpdateParams
- type DashboardsWorkflowPinParams
- type DashboardsWorkflowUnpinParams
- type DependencyGraphEdge
- type DependencyGraphGetParams
- type DependencyGraphNamespace
- type DependencyGraphNode
- type DependencyGraphResponse
- type DeployCreatedResource
- type DeployCreatedResourceSidecar
- type DeployEnvs
- type DeployEnvsInput
- type DeployPlanInput
- type DeployPlanResult
- type DeployPlanResultResult
- type DeployPlanResultResultError
- type DeployPlannedChange
- type DeployPlannedChangeSidecar
- type DeployRepo
- type DeployRollbackInput
- type DeployRunLog
- type DeployStage
- type DeployStatus
- type DeployTrigger
- type DeployTriggerInput
- type DeploymentRun
- type DeploymentRunInput
- type DeploymentRunInputError
- type DeploymentsEnvsParams
- type DeploymentsNamespace
- func (n *DeploymentsNamespace) Envs(ctx context.Context, params *DeploymentsEnvsParams, opts ...RequestOption) (*DeployEnvs, error)
- func (n *DeploymentsNamespace) Plan(ctx context.Context, params *DeploymentsPlanParams, opts ...RequestOption) (*DeployPlanResult, error)
- func (n *DeploymentsNamespace) Repos(ctx context.Context, params *DeploymentsReposParams, opts ...RequestOption) ([]DeployRepo, error)
- type DeploymentsPlanParams
- type DeploymentsReposParams
- type DeploymentsRunsCreateParams
- type DeploymentsRunsCreateResponse
- type DeploymentsRunsGetParams
- type DeploymentsRunsListParams
- type DeploymentsRunsNamespace
- func (n *DeploymentsRunsNamespace) Create(ctx context.Context, params *DeploymentsRunsCreateParams, ...) (*DeploymentsRunsCreateResponse, error)
- func (n *DeploymentsRunsNamespace) Get(ctx context.Context, params DeploymentsRunsGetParams, opts ...RequestOption) (*DeploymentRun, error)
- func (n *DeploymentsRunsNamespace) List(ctx context.Context, params *DeploymentsRunsListParams, opts ...RequestOption) ([]DeploymentRun, error)
- func (n *DeploymentsRunsNamespace) Rollback(ctx context.Context, params DeploymentsRunsRollbackParams, ...) (*DeployPlanResult, error)
- type DeploymentsRunsRollbackParams
- type DeploymentsTriggersCreateParams
- type DeploymentsTriggersDeleteParams
- type DeploymentsTriggersListParams
- type DeploymentsTriggersNamespace
- func (n *DeploymentsTriggersNamespace) Create(ctx context.Context, params *DeploymentsTriggersCreateParams, ...) (*DeployTrigger, error)
- func (n *DeploymentsTriggersNamespace) Delete(ctx context.Context, params DeploymentsTriggersDeleteParams, ...) (*OK, error)
- func (n *DeploymentsTriggersNamespace) List(ctx context.Context, params *DeploymentsTriggersListParams, ...) ([]DeployTrigger, error)
- func (n *DeploymentsTriggersNamespace) Update(ctx context.Context, params DeploymentsTriggersUpdateParams, ...) (*DeployTrigger, error)
- type DeploymentsTriggersUpdateParams
- type DeploymentsTriggersUpdateRequest
- type DescribeRequest
- type DescribeResponse
- type DigestEmailRecipient
- type DigestEmailRecipientCreate
- type DigestEmailRecipientList
- type DigestGetParams
- type DigestNamespace
- func (n *DigestNamespace) Get(ctx context.Context, params *DigestGetParams, opts ...RequestOption) (*DigestSettings, error)
- func (n *DigestNamespace) Send(ctx context.Context, params *DigestSendParams, opts ...RequestOption) (*DigestSendResult, error)
- func (n *DigestNamespace) Update(ctx context.Context, params *DigestUpdateParams, opts ...RequestOption) (*DigestSettings, error)
- type DigestRecipientsCreateParams
- type DigestRecipientsDeleteParams
- type DigestRecipientsDeleteResponse
- type DigestRecipientsGetParams
- type DigestRecipientsNamespace
- func (n *DigestRecipientsNamespace) Create(ctx context.Context, params *DigestRecipientsCreateParams, ...) (*DigestEmailRecipient, error)
- func (n *DigestRecipientsNamespace) Delete(ctx context.Context, params DigestRecipientsDeleteParams, ...) (*DigestRecipientsDeleteResponse, error)
- func (n *DigestRecipientsNamespace) Get(ctx context.Context, params *DigestRecipientsGetParams, opts ...RequestOption) (*DigestEmailRecipientList, error)
- type DigestSendParams
- type DigestSendResult
- type DigestSettings
- type DigestSettingsUpdate
- type DigestTransportResult
- type DigestUpdateParams
- type DismissedPostureFinding
- type DockerCommandParams
- type DockerCommandRequest
- type DockerCommandResponse
- type DockerNamespace
- type DriftAlertSettings
- type DriftAlertSettingsUpdate
- type EditableField
- type EnvironmentDiffEntry
- type EnvironmentDiffFieldChange
- type EnvironmentDiffGetParams
- type EnvironmentDiffNamespace
- type EnvironmentDiffResourceRef
- type EnvironmentDiffResponse
- type EnvironmentDiffSideSummary
- type EnvironmentDiffTotals
- type EnvironmentDiffTypeSummary
- type EnvironmentDiffUnavailableType
- type Error
- type EscalationPolicy
- type ExchangeRate
- type ExchangeRateInput
- type ExpiringGetParams
- type ExpiringNamespace
- type ExpiringSettingsGetParams
- type ExpiringSettingsNamespace
- type ExpiringSettingsUpdateParams
- type ExpiryAlertSettings
- type ExpiryAlertSettingsUpdate
- type ExpiryItem
- type ExpiryListResponse
- type ExpirySeverityCounts
- type ExportCredentialRequest
- type ExportTerraformRequest
- type FieldActionRequest
- type FieldActionResponse
- type FieldActionResponseOption
- type GenerateSSHKeyRequest
- type GeneratedSSHKey
- type HygieneFinding
- type HygieneReport
- type HygieneReportCounts
- type ImportSSHKeyRequest
- type ImportYAMLRequest
- type ImportedSSHKey
- type Invitation
- type InvitationDetail
- type InvitationsAcceptParams
- type InvitationsByTokenGetParams
- type InvitationsByTokenNamespace
- type InvitationsNamespace
- type InviteRequest
- type InviteResponse
- type InvokeActionRequest
- type JSONObject
- type JiraDeleteParams
- type JiraGetParams
- type JiraGetResponse
- type JiraIntegration
- type JiraIntegrationInput
- type JiraIssueLink
- type JiraIssueType
- type JiraIssuesParams
- type JiraLinksParams
- type JiraNamespace
- func (n *JiraNamespace) Delete(ctx context.Context, params *JiraDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *JiraNamespace) Get(ctx context.Context, params *JiraGetParams, opts ...RequestOption) (*JiraGetResponse, error)
- func (n *JiraNamespace) Issues(ctx context.Context, params JiraIssuesParams, opts ...RequestOption) (*CreateJiraIssueResult, error)
- func (n *JiraNamespace) Links(ctx context.Context, params *JiraLinksParams, opts ...RequestOption) ([]JiraIssueLink, error)
- func (n *JiraNamespace) Update(ctx context.Context, params JiraUpdateParams, opts ...RequestOption) (*JiraIntegration, error)
- func (n *JiraNamespace) Verify(ctx context.Context, params *JiraVerifyParams, opts ...RequestOption) (*JiraVerifyResult, error)
- type JiraProject
- type JiraProjectsIssueTypesParams
- type JiraProjectsListParams
- type JiraProjectsNamespace
- type JiraSourceKind
- type JiraUpdateParams
- type JiraVerifyInput
- type JiraVerifyParams
- type JiraVerifyResult
- type KVCommandParams
- type KVCommandRequest
- type KVCommandResponse
- type KVNamespace
- type LeaseConflict
- type LeasesCancelParams
- type LeasesCreateParams
- type LeasesDeleteParams
- type LeasesGetParams
- type LeasesNamespace
- func (n *LeasesNamespace) Cancel(ctx context.Context, params LeasesCancelParams, opts ...RequestOption) (*ResourceLease, error)
- func (n *LeasesNamespace) Create(ctx context.Context, params *LeasesCreateParams, opts ...RequestOption) (*ResourceLease, error)
- func (n *LeasesNamespace) Delete(ctx context.Context, params LeasesDeleteParams, opts ...RequestOption) error
- func (n *LeasesNamespace) Get(ctx context.Context, params *LeasesGetParams, opts ...RequestOption) (*ResourceLeaseList, error)
- func (n *LeasesNamespace) Resource(ctx context.Context, params LeasesResourceParams, opts ...RequestOption) (*ResourceLeaseLookup, error)
- func (n *LeasesNamespace) Update(ctx context.Context, params LeasesUpdateParams, opts ...RequestOption) (*ResourceLease, error)
- type LeasesResourceParams
- type LeasesUpdateParams
- type LinearDeleteParams
- type LinearGetParams
- type LinearGetResponse
- type LinearIntegration
- type LinearIntegrationInput
- type LinearIssueLink
- type LinearIssuesParams
- type LinearLinksParams
- type LinearNamespace
- func (n *LinearNamespace) Delete(ctx context.Context, params *LinearDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *LinearNamespace) Get(ctx context.Context, params *LinearGetParams, opts ...RequestOption) (*LinearGetResponse, error)
- func (n *LinearNamespace) Issues(ctx context.Context, params LinearIssuesParams, opts ...RequestOption) (*CreateLinearIssueResult, error)
- func (n *LinearNamespace) Links(ctx context.Context, params *LinearLinksParams, opts ...RequestOption) ([]LinearIssueLink, error)
- func (n *LinearNamespace) Teams(ctx context.Context, params *LinearTeamsParams, opts ...RequestOption) ([]LinearTeam, error)
- func (n *LinearNamespace) Update(ctx context.Context, params LinearUpdateParams, opts ...RequestOption) (*LinearIntegration, error)
- func (n *LinearNamespace) Verify(ctx context.Context, params *LinearVerifyParams, opts ...RequestOption) (*LinearVerifyResult, error)
- type LinearSourceKind
- type LinearTeam
- type LinearTeamsParams
- type LinearUpdateParams
- type LinearVerifyInput
- type LinearVerifyParams
- type LinearVerifyResult
- type LiteralAssociationRequest
- type LogCapableResource
- type LogCapableResourceList
- type LogStreamSelector
- type LogWorkspaceQuery
- type LogWorkspaceQueryConflict
- type LogWorkspaceQueryCreate
- type LogWorkspaceQueryList
- type LogWorkspaceQueryUpdate
- type LogWorkspaceQueryUpdateConflict
- type LogWorkspacesCreateParams
- type LogWorkspacesDeleteParams
- type LogWorkspacesGetParams
- type LogWorkspacesNamespace
- func (n *LogWorkspacesNamespace) Create(ctx context.Context, params LogWorkspacesCreateParams, opts ...RequestOption) (*LogWorkspaceQuery, error)
- func (n *LogWorkspacesNamespace) Delete(ctx context.Context, params LogWorkspacesDeleteParams, opts ...RequestOption) error
- func (n *LogWorkspacesNamespace) Get(ctx context.Context, params *LogWorkspacesGetParams, opts ...RequestOption) (*LogWorkspaceQueryList, error)
- func (n *LogWorkspacesNamespace) Resources(ctx context.Context, params *LogWorkspacesResourcesParams, ...) (*LogCapableResourceList, error)
- func (n *LogWorkspacesNamespace) Update(ctx context.Context, params LogWorkspacesUpdateParams, opts ...RequestOption) (*LogWorkspaceQuery, error)
- type LogWorkspacesResourcesParams
- type LogWorkspacesUpdateParams
- type LogsRequest
- type LogsResponse
- type Manifest
- type MeResponse
- type MetricAlertEvent
- type MetricAlertRule
- type MetricAlertRuleInput
- type MetricAlertRuleWithStatus
- type MetricAlertSelectorOptions
- type MetricAlertSelectorOptionsPlugins
- type MetricAlertSelectorPreview
- type MetricAlertsCreateParams
- type MetricAlertsDeleteParams
- type MetricAlertsEventsParams
- type MetricAlertsGetParams
- type MetricAlertsListParams
- type MetricAlertsMetricKeysParams
- type MetricAlertsNamespace
- func (n *MetricAlertsNamespace) Create(ctx context.Context, params MetricAlertsCreateParams, opts ...RequestOption) (*MetricAlertRule, error)
- func (n *MetricAlertsNamespace) Delete(ctx context.Context, params MetricAlertsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *MetricAlertsNamespace) Events(ctx context.Context, params *MetricAlertsEventsParams, opts ...RequestOption) ([]MetricAlertEvent, error)
- func (n *MetricAlertsNamespace) Get(ctx context.Context, params MetricAlertsGetParams, opts ...RequestOption) (*MetricAlertRule, error)
- func (n *MetricAlertsNamespace) List(ctx context.Context, params *MetricAlertsListParams, opts ...RequestOption) ([]MetricAlertRuleWithStatus, error)
- func (n *MetricAlertsNamespace) MetricKeys(ctx context.Context, params *MetricAlertsMetricKeysParams, ...) ([]MetricSeriesKey, error)
- func (n *MetricAlertsNamespace) SelectorOptions(ctx context.Context, params *MetricAlertsSelectorOptionsParams, ...) (*MetricAlertSelectorOptions, error)
- func (n *MetricAlertsNamespace) SelectorPreview(ctx context.Context, params *MetricAlertsSelectorPreviewParams, ...) (*MetricAlertSelectorPreview, error)
- func (n *MetricAlertsNamespace) Update(ctx context.Context, params MetricAlertsUpdateParams, opts ...RequestOption) (*MetricAlertRule, error)
- type MetricAlertsSelectorOptionsParams
- type MetricAlertsSelectorPreviewParams
- type MetricAlertsUpdateParams
- type MetricSeries
- type MetricSeriesKey
- type MetricSeriesPoints
- type MetricsRequest
- type MetricsResponse
- type MomentEvent
- type MomentEventLink
- type MomentFeedID
- type MomentFeedStatus
- type MomentGetParams
- type MomentIncidentSpan
- type MomentNamespace
- type MomentResponse
- type MomentSeverity
- type MsTeamsStatus
- type MsTeamsWebhook
- type MsTeamsWebhookCreate
- type MsTeamsWebhookUpdate
- type MsteamsNamespace
- type MsteamsStatusParams
- type MsteamsTestParams
- type MsteamsTestResponse
- type MsteamsWebhooksCreateParams
- type MsteamsWebhooksDeleteParams
- type MsteamsWebhooksNamespace
- func (n *MsteamsWebhooksNamespace) Create(ctx context.Context, params *MsteamsWebhooksCreateParams, ...) (*MsTeamsWebhook, error)
- func (n *MsteamsWebhooksNamespace) Delete(ctx context.Context, params MsteamsWebhooksDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *MsteamsWebhooksNamespace) Update(ctx context.Context, params MsteamsWebhooksUpdateParams, opts ...RequestOption) (*MsTeamsWebhook, error)
- type MsteamsWebhooksUpdateParams
- type NoSQLCommandRequest
- type OK
- type OrgConfigAlertSettings
- type OrgConfigAlertSettingsCostAnomaly
- type OrgConfigAlertSettingsDigest
- type OrgConfigAlertSettingsDrift
- type OrgConfigAlertSettingsExpiry
- type OrgConfigAlertSettingsPosture
- type OrgConfigApplyResult
- type OrgConfigApplyResultCounts
- type OrgConfigBudget
- type OrgConfigBudgetThresholds
- type OrgConfigChange
- type OrgConfigCostCentre
- type OrgConfigCostCentreRules
- type OrgConfigCostCentreRulesMatch
- type OrgConfigCostFilter
- type OrgConfigCustomGraph
- type OrgConfigDashboard
- type OrgConfigDashboardCard
- type OrgConfigDocument
- type OrgConfigDocumentExportedFrom
- type OrgConfigDocumentTagPolicy
- type OrgConfigDocumentTagPolicyRequiredTags
- type OrgConfigMetricAlert
- type OrgConfigPlan
- type OrgConfigPlanCounts
- type OrgConfigProbe
- type OrgConfigRequest
- type OrgConfigSection
- type OrgConfigUnresolved
- type OrgConfigWorkflow
- type OrgConfigWorkflowMetrics
- type OrgConfigWorkflowTrigger
- type OrgMember
- type OrgMembership
- type OrgStatusIncident
- type OrgStatusIncidentsResponse
- type Organization
- type OrganizationRef
- type OrganizationRole
- type OrgsCreateParams
- type OrgsNamespace
- type OrphanAccountGroup
- type OrphanCostAnnotation
- type OrphanListResponse
- type OrphanedResource
- type OrphansGetParams
- type OrphansNamespace
- type OversizedAccountGroup
- type OversizedResource
- type OversizedSizeSummary
- type OwnerCandidate
- type OwnerCandidateListResponse
- type OwnershipBlocker
- type OwnershipDeleteParams
- type OwnershipGetParams
- type OwnershipMembersParams
- type OwnershipNamespace
- func (n *OwnershipNamespace) Delete(ctx context.Context, params OwnershipDeleteParams, opts ...RequestOption) error
- func (n *OwnershipNamespace) Get(ctx context.Context, params *OwnershipGetParams, opts ...RequestOption) (*ResourceOwnershipListResponse, error)
- func (n *OwnershipNamespace) Members(ctx context.Context, params *OwnershipMembersParams, opts ...RequestOption) (*OwnerCandidateListResponse, error)
- func (n *OwnershipNamespace) Resource(ctx context.Context, params OwnershipResourceParams, opts ...RequestOption) (*ResourceOwnershipEnvelope, error)
- func (n *OwnershipNamespace) Update(ctx context.Context, params *OwnershipUpdateParams, opts ...RequestOption) (any, error)
- type OwnershipResourceParams
- type OwnershipTransferRequired
- type OwnershipUpdateParams
- type PageClearResponse
- type PageRequest
- type PageResponse
- type PagesCreateParams
- type PagesDeleteParams
- type PagesNamespace
- type PeerPane
- type PeerPaneStub
- type PeerPanesRequest
- type Permission
- type PermissionCatalog
- type PickerResource
- type PickerResourcesRequest
- type PickerResourcesRequestSources
- type PinFull
- type PinRangeMetricSeries
- type PinRangeMetricSeriesPoints
- type PinRangeResponse
- type PinRequest
- type PluginID
- type PluginSummary
- type PolicyTemplate
- type PolicyTemplateHelpLink
- type PolicyTemplateResponse
- type PostureAlertSettings
- type PostureAlertSettingsUpdate
- type PostureDismissal
- type PostureDismissalCreate
- type PostureDismissalsCreateParams
- type PostureDismissalsDeleteParams
- type PostureDismissalsNamespace
- type PostureFinding
- type PostureGetParams
- type PostureListResponse
- type PostureNamespace
- type PostureSettingsGetParams
- type PostureSettingsNamespace
- type PostureSettingsUpdateParams
- type PostureSeverityCounts
- type PreflightCapability
- type PreflightCheck
- type PreflightCheckHelpLink
- type PreflightDeclaration
- type PreflightDeclarationTemplateFormat
- type PreflightPermission
- type PreflightReport
- type PreflightRequest
- type ProbeMetricSeries
- type ProbeMetricSeriesPoints
- type ProbeMetrics
- type ProbeRequest
- type ProbeRequestItems
- type ProbeStatus
- type ProbeStatusResourceCounts
- type ProbeStatusSparkline
- type ProbeSuggestion
- type ProbeSuggestions
- type ProbesCreateParams
- type ProbesDeleteParams
- type ProbesGetParams
- type ProbesMetricsParams
- type ProbesNamespace
- func (n *ProbesNamespace) Create(ctx context.Context, params *ProbesCreateParams, opts ...RequestOption) (*SyntheticProbe, error)
- func (n *ProbesNamespace) Delete(ctx context.Context, params ProbesDeleteParams, opts ...RequestOption) error
- func (n *ProbesNamespace) Get(ctx context.Context, params *ProbesGetParams, opts ...RequestOption) (*SyntheticProbeList, error)
- func (n *ProbesNamespace) Metrics(ctx context.Context, params ProbesMetricsParams, opts ...RequestOption) (*ProbeMetrics, error)
- func (n *ProbesNamespace) Suggestions(ctx context.Context, params *ProbesSuggestionsParams, opts ...RequestOption) (*ProbeSuggestions, error)
- func (n *ProbesNamespace) Update(ctx context.Context, params ProbesUpdateParams, opts ...RequestOption) (*SyntheticProbe, error)
- type ProbesSuggestionsParams
- type ProbesUpdateParams
- type Profile
- type ProfileEmailChangeConfirmParams
- type ProfileEmailChangeConfirmRequest
- type ProfileEmailChangeConfirmResponse
- type ProfileEmailChangeCreateParams
- type ProfileEmailChangeCreateRequest
- type ProfileEmailChangeCreateResponse
- type ProfileEmailChangeNamespace
- func (n *ProfileEmailChangeNamespace) Confirm(ctx context.Context, params *ProfileEmailChangeConfirmParams, ...) (*ProfileEmailChangeConfirmResponse, error)
- func (n *ProfileEmailChangeNamespace) Create(ctx context.Context, params *ProfileEmailChangeCreateParams, ...) (*ProfileEmailChangeCreateResponse, error)
- type ProfileIdentities
- type ProfileMFAChallengeParams
- type ProfileMFADeleteParams
- type ProfileMFANamespace
- func (n *ProfileMFANamespace) Challenge(ctx context.Context, params ProfileMFAChallengeParams, opts ...RequestOption) (*ProfileMfachallengeResponse, error)
- func (n *ProfileMFANamespace) Create(ctx context.Context, opts ...RequestOption) (*TOTPEnrollment, error)
- func (n *ProfileMFANamespace) Delete(ctx context.Context, params ProfileMFADeleteParams, opts ...RequestOption) (*OK, error)
- func (n *ProfileMFANamespace) List(ctx context.Context, opts ...RequestOption) ([]AuthFactor, error)
- func (n *ProfileMFANamespace) Verify(ctx context.Context, params ProfileMFAVerifyParams, opts ...RequestOption) (*ProfileMfaverifyResponse, error)
- type ProfileMFAVerifyParams
- type ProfileMfachallengeResponse
- type ProfileMfaverifyRequest
- type ProfileMfaverifyResponse
- type ProfileNamespace
- func (n *ProfileNamespace) Delete(ctx context.Context, opts ...RequestOption) (*AccountDeleted, error)
- func (n *ProfileNamespace) DeletionPreview(ctx context.Context, opts ...RequestOption) (*AccountDeletionPreview, error)
- func (n *ProfileNamespace) Get(ctx context.Context, opts ...RequestOption) (*Profile, error)
- func (n *ProfileNamespace) PasswordReset(ctx context.Context, opts ...RequestOption) (*ProfilePasswordResetResponse, error)
- func (n *ProfileNamespace) SendVerificationEmail(ctx context.Context, opts ...RequestOption) (*OK, error)
- func (n *ProfileNamespace) Update(ctx context.Context, params *ProfileUpdateParams, opts ...RequestOption) (*ProfileSummary, error)
- type ProfilePasswordResetResponse
- type ProfileSessionsDeleteParams
- type ProfileSessionsNamespace
- func (n *ProfileSessionsNamespace) Delete(ctx context.Context, params ProfileSessionsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *ProfileSessionsNamespace) List(ctx context.Context, opts ...RequestOption) ([]UserSession, error)
- func (n *ProfileSessionsNamespace) RevokeOthers(ctx context.Context, opts ...RequestOption) (*ProfileSessionsRevokeOthersResponse, error)
- type ProfileSessionsRevokeOthersResponse
- type ProfileSummary
- type ProfileUpdateParams
- type ProfileUpdateRequest
- type ProviderIncidentImpact
- type ProviderIncidentResourceSample
- type ProviderIncidentState
- type PublicStatusComponent
- type PublicStatusPage
- type PushedCostRow
- type QuietHours
- type ReauthenticationRequired
- type ReorderRequest
- type ReorderRequestCards
- type ReportDeliveryTargetOption
- type ReportDeliveryTargets
- type ReportNotification
- type ReportNotificationInput
- type ReportNotificationSendResult
- type ReportNotificationSendResultEmail
- type ReportNotificationSendResultSlack
- type ReportNotificationSendResultTeams
- type RequestOption
- type RequiredTag
- type Resource
- type ResourceChangeEntry
- type ResourceChangeFeedEntry
- type ResourceChangeFeedResponse
- type ResourceChangeKind
- type ResourceChangeListResponse
- type ResourceDetail
- type ResourceFieldChange
- type ResourceID
- type ResourceLease
- type ResourceLeaseCreate
- type ResourceLeaseList
- type ResourceLeaseLookup
- type ResourceLeaseUpdate
- type ResourceOwnerAnnotation
- type ResourceOwnership
- type ResourceOwnershipEnvelope
- type ResourceOwnershipListResponse
- type ResourceOwnershipPatch
- type ResourceStatus
- type ResourceTypeID
- type ResourceTypeSummary
- type ResourceTypeSummaryAttachTargets
- type ResourcesAttachParams
- type ResourcesCostEstimateParams
- type ResourcesCostEstimateResponse
- type ResourcesCreateConfigParams
- type ResourcesCreateParams
- type ResourcesCreatePricingParams
- type ResourcesDeleteParams
- type ResourcesDescribeParams
- type ResourcesDetailParams
- type ResourcesExportCredentialParams
- type ResourcesExportTerraformParams
- type ResourcesFieldActionParams
- type ResourcesImportYAMLParams
- type ResourcesInvokeActionParams
- type ResourcesLogsParams
- type ResourcesManifestCreateParams
- type ResourcesManifestGetParams
- type ResourcesManifestNamespace
- type ResourcesMetricsParams
- type ResourcesNamespace
- func (n *ResourcesNamespace) Attach(ctx context.Context, params ResourcesAttachParams, opts ...RequestOption) (*OK, error)
- func (n *ResourcesNamespace) CostEstimate(ctx context.Context, params ResourcesCostEstimateParams, opts ...RequestOption) (*ResourcesCostEstimateResponse, error)
- func (n *ResourcesNamespace) Create(ctx context.Context, params ResourcesCreateParams, opts ...RequestOption) (*CreateResourceResponse, error)
- func (n *ResourcesNamespace) CreateConfig(ctx context.Context, params ResourcesCreateConfigParams, opts ...RequestOption) (JSONObject, error)
- func (n *ResourcesNamespace) CreatePricing(ctx context.Context, params ResourcesCreatePricingParams, ...) (map[string]JSONObject, error)
- func (n *ResourcesNamespace) Delete(ctx context.Context, params ResourcesDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *ResourcesNamespace) Describe(ctx context.Context, params ResourcesDescribeParams, opts ...RequestOption) (*DescribeResponse, error)
- func (n *ResourcesNamespace) Detail(ctx context.Context, params ResourcesDetailParams, opts ...RequestOption) (*ResourceDetail, error)
- func (n *ResourcesNamespace) ExportCredential(ctx context.Context, params ResourcesExportCredentialParams, ...) (*CredentialExport, error)
- func (n *ResourcesNamespace) ExportTerraform(ctx context.Context, params ResourcesExportTerraformParams, ...) (*TerraformExport, error)
- func (n *ResourcesNamespace) FieldAction(ctx context.Context, params ResourcesFieldActionParams, opts ...RequestOption) (*FieldActionResponse, error)
- func (n *ResourcesNamespace) ImportYAML(ctx context.Context, params ResourcesImportYAMLParams, opts ...RequestOption) (JSONObject, error)
- func (n *ResourcesNamespace) InvokeAction(ctx context.Context, params ResourcesInvokeActionParams, opts ...RequestOption) (*OK, error)
- func (n *ResourcesNamespace) Logs(ctx context.Context, params ResourcesLogsParams, opts ...RequestOption) (*LogsResponse, error)
- func (n *ResourcesNamespace) Metrics(ctx context.Context, params ResourcesMetricsParams, opts ...RequestOption) (*MetricsResponse, error)
- func (n *ResourcesNamespace) NoSQLCommand(ctx context.Context, params ResourcesNoSQLCommandParams, opts ...RequestOption) (*ResourcesNoSqlcommandResponse, error)
- func (n *ResourcesNamespace) PeerPanes(ctx context.Context, params ResourcesPeerPanesParams, opts ...RequestOption) ([]PeerPane, error)
- func (n *ResourcesNamespace) PickerResources(ctx context.Context, params ResourcesPickerResourcesParams, ...) ([]PickerResource, error)
- func (n *ResourcesNamespace) Update(ctx context.Context, params ResourcesUpdateParams, opts ...RequestOption) (*UpdateResourceResponse, error)
- type ResourcesNoSQLCommandParams
- type ResourcesNoSqlcommandResponse
- type ResourcesPeerPanesParams
- type ResourcesPickerResourcesParams
- type ResourcesSecretVersionsAccessParams
- type ResourcesSecretVersionsAddParams
- type ResourcesSecretVersionsGetParams
- type ResourcesSecretVersionsModifyParams
- type ResourcesSecretVersionsNamespace
- func (n *ResourcesSecretVersionsNamespace) Access(ctx context.Context, params ResourcesSecretVersionsAccessParams, ...) (*SecretAccessResponse, error)
- func (n *ResourcesSecretVersionsNamespace) Add(ctx context.Context, params ResourcesSecretVersionsAddParams, ...) (*SecretVersionResponse, error)
- func (n *ResourcesSecretVersionsNamespace) Get(ctx context.Context, params ResourcesSecretVersionsGetParams, ...) (*SecretVersionsResponse, error)
- func (n *ResourcesSecretVersionsNamespace) Modify(ctx context.Context, params ResourcesSecretVersionsModifyParams, ...) (*SecretVersionResponse, error)
- type ResourcesUpdateParams
- type RightsizingGetParams
- type RightsizingListResponse
- type RightsizingNamespace
- type Role
- type RoleChangeRequest
- type RoleCreateRequest
- type RoleSummary
- type RoleUpdateRequest
- type SFTPDeleteParams
- type SFTPDeleteRequest
- type SFTPDownloadParams
- type SFTPEntry
- type SFTPListParams
- type SFTPListRequest
- type SFTPMkdirParams
- type SFTPNamespace
- func (n *SFTPNamespace) Delete(ctx context.Context, params SFTPDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *SFTPNamespace) Download(ctx context.Context, params SFTPDownloadParams, opts ...RequestOption) (io.ReadCloser, error)
- func (n *SFTPNamespace) List(ctx context.Context, params SFTPListParams, opts ...RequestOption) ([]SFTPEntry, error)
- func (n *SFTPNamespace) Mkdir(ctx context.Context, params SFTPMkdirParams, opts ...RequestOption) (*OK, error)
- func (n *SFTPNamespace) Upload(ctx context.Context, params SFTPUploadParams, opts ...RequestOption) (*OK, error)
- type SFTPPathRequest
- type SFTPUploadForm
- type SFTPUploadParams
- type SQLEstimateParams
- type SQLEstimateRequest
- type SQLExecuteParams
- type SQLExecuteRequest
- type SQLExecuteResponse
- type SQLNamespace
- func (n *SQLNamespace) Estimate(ctx context.Context, params SQLEstimateParams, opts ...RequestOption) (JSONObject, error)
- func (n *SQLNamespace) Execute(ctx context.Context, params SQLExecuteParams, opts ...RequestOption) (*SQLExecuteResponse, error)
- func (n *SQLNamespace) Query(ctx context.Context, params SQLQueryParams, opts ...RequestOption) (any, error)
- type SQLQueryParams
- type SQLQueryRequest
- type SQLQueryResponse
- type SSHExecRequest
- type SSHExecResponse
- type SSHFanoutHostResult
- type SSHFanoutNamespace
- type SSHFanoutRunParams
- type SSHFanoutRunRequest
- type SSHFanoutRunResponse
- type SSHFanoutSnippetsCreateParams
- type SSHFanoutSnippetsDeleteParams
- type SSHFanoutSnippetsGetParams
- type SSHFanoutSnippetsNamespace
- func (n *SSHFanoutSnippetsNamespace) Create(ctx context.Context, params SSHFanoutSnippetsCreateParams, ...) (*SshfanoutSnippetsCreateResponse, error)
- func (n *SSHFanoutSnippetsNamespace) Delete(ctx context.Context, params SSHFanoutSnippetsDeleteParams, ...) (*OK, error)
- func (n *SSHFanoutSnippetsNamespace) Get(ctx context.Context, params *SSHFanoutSnippetsGetParams, opts ...RequestOption) (*SshfanoutSnippetsGetResponse, error)
- func (n *SSHFanoutSnippetsNamespace) Update(ctx context.Context, params SSHFanoutSnippetsUpdateParams, ...) (*OK, error)
- type SSHFanoutSnippetsUpdateParams
- type SSHFanoutTarget
- type SSHFanoutTargetsParams
- type SSHFanoutTargetsResponse
- type SSHKey
- type SSHKeyType
- type SSHKeysCreateParams
- type SSHKeysDeleteParams
- type SSHKeysImportParams
- type SSHKeysListParams
- type SSHKeysNamespace
- func (n *SSHKeysNamespace) Create(ctx context.Context, params SSHKeysCreateParams, opts ...RequestOption) (*GeneratedSSHKey, error)
- func (n *SSHKeysNamespace) Delete(ctx context.Context, params SSHKeysDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *SSHKeysNamespace) Import(ctx context.Context, params SSHKeysImportParams, opts ...RequestOption) (*ImportedSSHKey, error)
- func (n *SSHKeysNamespace) List(ctx context.Context, params *SSHKeysListParams, opts ...RequestOption) ([]SSHKey, error)
- type SSHSnippet
- type SSHSnippetInput
- type SSHTunnelCreateAccountRequest
- type SSHTunnelCreateAccountResponse
- type SSHTunnelsActiveParams
- type SSHTunnelsCloseParams
- type SSHTunnelsCreateAccountParams
- type SSHTunnelsExecParams
- type SSHTunnelsNamespace
- func (n *SSHTunnelsNamespace) Active(ctx context.Context, params *SSHTunnelsActiveParams, opts ...RequestOption) (map[string]ActiveTunnel, error)
- func (n *SSHTunnelsNamespace) Close(ctx context.Context, params SSHTunnelsCloseParams, opts ...RequestOption) (*OK, error)
- func (n *SSHTunnelsNamespace) CreateAccount(ctx context.Context, params SSHTunnelsCreateAccountParams, ...) (*SSHTunnelCreateAccountResponse, error)
- func (n *SSHTunnelsNamespace) Exec(ctx context.Context, params SSHTunnelsExecParams, opts ...RequestOption) (*SSHExecResponse, error)
- func (n *SSHTunnelsNamespace) Open(ctx context.Context, params SSHTunnelsOpenParams, opts ...RequestOption) (*SshtunnelsOpenResponse, error)
- type SSHTunnelsOpenParams
- type SavedCostFilter
- type SavedCostFilterInput
- type SavedCostFilterReferent
- type SavedCostFilterTerm
- type SavedCostFiltersCreateParams
- type SavedCostFiltersDeleteParams
- type SavedCostFiltersGetParams
- type SavedCostFiltersListParams
- type SavedCostFiltersNamespace
- func (n *SavedCostFiltersNamespace) Create(ctx context.Context, params SavedCostFiltersCreateParams, ...) (*SavedCostFilter, error)
- func (n *SavedCostFiltersNamespace) Delete(ctx context.Context, params SavedCostFiltersDeleteParams, ...) (*OK, error)
- func (n *SavedCostFiltersNamespace) Get(ctx context.Context, params SavedCostFiltersGetParams, opts ...RequestOption) (*SavedCostFilter, error)
- func (n *SavedCostFiltersNamespace) List(ctx context.Context, params *SavedCostFiltersListParams, opts ...RequestOption) ([]SavedCostFilter, error)
- func (n *SavedCostFiltersNamespace) Referents(ctx context.Context, params SavedCostFiltersReferentsParams, ...) (*SavedCostFiltersReferentsResponse, error)
- func (n *SavedCostFiltersNamespace) Update(ctx context.Context, params SavedCostFiltersUpdateParams, ...) (*SavedCostFilter, error)
- type SavedCostFiltersReferentsParams
- type SavedCostFiltersReferentsResponse
- type SavedCostFiltersUpdateParams
- type ScheduleConflict
- type ScheduleTransition
- type SchedulesCreateParams
- type SchedulesDeleteParams
- type SchedulesGetParams
- type SchedulesNamespace
- func (n *SchedulesNamespace) Create(ctx context.Context, params *SchedulesCreateParams, opts ...RequestOption) (*SleepSchedule, error)
- func (n *SchedulesNamespace) Delete(ctx context.Context, params SchedulesDeleteParams, opts ...RequestOption) error
- func (n *SchedulesNamespace) Get(ctx context.Context, params *SchedulesGetParams, opts ...RequestOption) (*SleepScheduleList, error)
- func (n *SchedulesNamespace) Preview(ctx context.Context, params *SchedulesPreviewParams, opts ...RequestOption) (*SleepSchedulePreview, error)
- func (n *SchedulesNamespace) Update(ctx context.Context, params SchedulesUpdateParams, opts ...RequestOption) (*SleepSchedule, error)
- type SchedulesPreviewParams
- type SchedulesUpdateParams
- type SearchHit
- type SearchListParams
- type SearchNamespace
- type SeatLimitResponse
- type SecretAccessRequest
- type SecretAccessResponse
- type SecretAddRequest
- type SecretExportTemplate
- type SecretExportTemplateEntries
- type SecretModifyRequest
- type SecretVersion
- type SecretVersionResponse
- type SecretVersionsResponse
- type Session
- type SessionRecording
- type SessionRecordingSettings
- type SessionRecordingSettingsUpdate
- type SessionRecordingUsage
- type SessionRecordingsCastParams
- type SessionRecordingsDeleteParams
- type SessionRecordingsGetParams
- type SessionRecordingsListParams
- type SessionRecordingsNamespace
- func (n *SessionRecordingsNamespace) Cast(ctx context.Context, params SessionRecordingsCastParams, opts ...RequestOption) (io.ReadCloser, error)
- func (n *SessionRecordingsNamespace) Delete(ctx context.Context, params SessionRecordingsDeleteParams, ...) (*OK, error)
- func (n *SessionRecordingsNamespace) Get(ctx context.Context, params SessionRecordingsGetParams, opts ...RequestOption) (*SessionRecording, error)
- func (n *SessionRecordingsNamespace) List(ctx context.Context, params *SessionRecordingsListParams, ...) ([]SessionRecording, error)
- type SessionRecordingsSettingsGetParams
- type SessionRecordingsSettingsNamespace
- func (n *SessionRecordingsSettingsNamespace) Get(ctx context.Context, params *SessionRecordingsSettingsGetParams, ...) (*SessionRecordingSettings, error)
- func (n *SessionRecordingsSettingsNamespace) Update(ctx context.Context, params *SessionRecordingsSettingsUpdateParams, ...) (*SessionRecordingSettings, error)
- type SessionRecordingsSettingsUpdateParams
- type ShowbackReport
- type ShowbackReportCentres
- type SlackAvailableChannel
- type SlackChannel
- type SlackChannelCreate
- type SlackChannelUpdate
- type SlackChannelsCreateParams
- type SlackChannelsDeleteParams
- type SlackChannelsNamespace
- func (n *SlackChannelsNamespace) Create(ctx context.Context, params *SlackChannelsCreateParams, opts ...RequestOption) (*SlackChannel, error)
- func (n *SlackChannelsNamespace) Delete(ctx context.Context, params SlackChannelsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *SlackChannelsNamespace) Update(ctx context.Context, params SlackChannelsUpdateParams, opts ...RequestOption) (*SlackChannel, error)
- type SlackChannelsUpdateParams
- type SlackInstallURLParams
- type SlackInstallUrlresponse
- type SlackInstallation
- type SlackInstallationsAvailableChannelsParams
- type SlackInstallationsAvailableChannelsResponse
- type SlackInstallationsDeleteParams
- type SlackInstallationsNamespace
- func (n *SlackInstallationsNamespace) AvailableChannels(ctx context.Context, params SlackInstallationsAvailableChannelsParams, ...) (*SlackInstallationsAvailableChannelsResponse, error)
- func (n *SlackInstallationsNamespace) Delete(ctx context.Context, params SlackInstallationsDeleteParams, ...) (*OK, error)
- type SlackNamespace
- func (n *SlackNamespace) InstallURL(ctx context.Context, params *SlackInstallURLParams, opts ...RequestOption) (*SlackInstallUrlresponse, error)
- func (n *SlackNamespace) Status(ctx context.Context, params *SlackStatusParams, opts ...RequestOption) (*SlackStatus, error)
- func (n *SlackNamespace) Test(ctx context.Context, params *SlackTestParams, opts ...RequestOption) (*SlackTestResponse, error)
- type SlackStatus
- type SlackStatusParams
- type SlackTestParams
- type SlackTestResponse
- type SleepSchedule
- type SleepScheduleCreate
- type SleepScheduleList
- type SleepSchedulePreview
- type SleepSchedulePreviewRequest
- type SleepScheduleUpdate
- type SshfanoutHostResultHostKeyTrust
- type SshfanoutRunRequestTargets
- type SshfanoutSnippetsCreateResponse
- type SshfanoutSnippetsGetResponse
- type SshtunnelsCloseRequest
- type SshtunnelsOpenRequest
- type SshtunnelsOpenResponse
- type StatusDot
- type StatusGetParams
- type StatusHistoryDay
- type StatusIncidentsGetParams
- type StatusIncidentsNamespace
- type StatusNamespace
- type StatusPage
- type StatusPageComponent
- type StatusPageComponentInput
- type StatusPageCreate
- type StatusPageListResponse
- type StatusPagePatch
- type StatusPagesCreateParams
- type StatusPagesDeleteParams
- type StatusPagesGetParams
- type StatusPagesNamespace
- func (n *StatusPagesNamespace) Create(ctx context.Context, params *StatusPagesCreateParams, opts ...RequestOption) (*StatusPage, error)
- func (n *StatusPagesNamespace) Delete(ctx context.Context, params StatusPagesDeleteParams, opts ...RequestOption) error
- func (n *StatusPagesNamespace) Get(ctx context.Context, params *StatusPagesGetParams, opts ...RequestOption) (*StatusPageListResponse, error)
- func (n *StatusPagesNamespace) RotateSlug(ctx context.Context, params StatusPagesRotateSlugParams, opts ...RequestOption) (*StatusPage, error)
- func (n *StatusPagesNamespace) Update(ctx context.Context, params StatusPagesUpdateParams, opts ...RequestOption) (*StatusPage, error)
- type StatusPagesRotateSlugParams
- type StatusPagesUpdateParams
- type StorageDeleteParams
- type StorageDownloadParams
- type StorageListParams
- type StorageListRequest
- type StorageMkdirParams
- type StorageNamespace
- func (n *StorageNamespace) Delete(ctx context.Context, params StorageDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *StorageNamespace) Download(ctx context.Context, params StorageDownloadParams, opts ...RequestOption) (io.ReadCloser, error)
- func (n *StorageNamespace) List(ctx context.Context, params StorageListParams, opts ...RequestOption) ([]StorageObject, error)
- func (n *StorageNamespace) Mkdir(ctx context.Context, params StorageMkdirParams, opts ...RequestOption) (*OK, error)
- func (n *StorageNamespace) Upload(ctx context.Context, params StorageUploadParams, opts ...RequestOption) (*OK, error)
- type StorageObject
- type StoragePathRequest
- type StorageUploadForm
- type StorageUploadParams
- type StripeRedirectURL
- type Subscription
- type SwapAllocationRulesBody
- type SyncResponse
- type SyncedResource
- type SyntheticProbe
- type SyntheticProbeCreate
- type SyntheticProbeList
- type SyntheticProbeUpdate
- type TOTPEnrollment
- type TabTarget
- type TagComplianceReport
- type TagPolicy
- type TagPolicyBlocked
- type TagPolicyComplianceParams
- type TagPolicyGetParams
- type TagPolicyNamespace
- func (n *TagPolicyNamespace) Compliance(ctx context.Context, params *TagPolicyComplianceParams, opts ...RequestOption) (*TagComplianceReport, error)
- func (n *TagPolicyNamespace) Get(ctx context.Context, params *TagPolicyGetParams, opts ...RequestOption) (*TagPolicy, error)
- func (n *TagPolicyNamespace) Update(ctx context.Context, params TagPolicyUpdateParams, opts ...RequestOption) (*TagPolicy, error)
- type TagPolicyUpdateParams
- type TagPolicyViolation
- type TeamInvitationsCreateParams
- type TeamInvitationsDeleteParams
- type TeamInvitationsListParams
- type TeamInvitationsNamespace
- func (n *TeamInvitationsNamespace) Create(ctx context.Context, params TeamInvitationsCreateParams, opts ...RequestOption) (*InviteResponse, error)
- func (n *TeamInvitationsNamespace) Delete(ctx context.Context, params TeamInvitationsDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *TeamInvitationsNamespace) List(ctx context.Context, params *TeamInvitationsListParams, opts ...RequestOption) ([]Invitation, error)
- type TeamMeParams
- type TeamMembersDeleteParams
- type TeamMembersListParams
- type TeamMembersNamespace
- func (n *TeamMembersNamespace) Delete(ctx context.Context, params TeamMembersDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *TeamMembersNamespace) List(ctx context.Context, params *TeamMembersListParams, opts ...RequestOption) ([]OrgMember, error)
- func (n *TeamMembersNamespace) Role(ctx context.Context, params TeamMembersRoleParams, opts ...RequestOption) (*OK, error)
- type TeamMembersRoleParams
- type TeamNamespace
- type TeamPermissionsParams
- type TeamRolesCreateParams
- type TeamRolesDeleteParams
- type TeamRolesListParams
- type TeamRolesNamespace
- func (n *TeamRolesNamespace) Create(ctx context.Context, params TeamRolesCreateParams, opts ...RequestOption) (*Role, error)
- func (n *TeamRolesNamespace) Delete(ctx context.Context, params TeamRolesDeleteParams, opts ...RequestOption) (*OK, error)
- func (n *TeamRolesNamespace) List(ctx context.Context, params *TeamRolesListParams, opts ...RequestOption) ([]Role, error)
- func (n *TeamRolesNamespace) Update(ctx context.Context, params TeamRolesUpdateParams, opts ...RequestOption) (*Role, error)
- type TeamRolesUpdateParams
- type TerraformExport
- type TerraformExportExported
- type TerraformExportUnsupported
- type UnpinRequest
- type UntaggedSpendReport
- type UntaggedSpendReportByKey
- type UntaggedSpendReportTopUntagged
- type UpdateAccountRequest
- type UpdateResourceRequest
- type UpdateResourceResponse
- type UpdateWidgetRequest
- type UpdatedAccount
- type UserSession
- type ValidateTabsRequest
- type ValidateTabsRequestTabs
- type ValidateTabsResponse
- type WorkflowApproval
- type WorkflowApprovalStatus
- type WorkflowApprovalsApproveParams
- type WorkflowApprovalsDenyParams
- type WorkflowApprovalsListParams
- type WorkflowApprovalsNamespace
- func (n *WorkflowApprovalsNamespace) Approve(ctx context.Context, params WorkflowApprovalsApproveParams, ...) (*WorkflowApproval, error)
- func (n *WorkflowApprovalsNamespace) Deny(ctx context.Context, params WorkflowApprovalsDenyParams, opts ...RequestOption) (*WorkflowApproval, error)
- func (n *WorkflowApprovalsNamespace) List(ctx context.Context, params *WorkflowApprovalsListParams, ...) ([]WorkflowApproval, error)
- type WorkflowPinRequest
- type WorkflowSchedule
- type WorkflowScheduleInput
- type WorkflowScheduleResponse
- type WorkflowsNamespace
- type WorkflowsScheduleDeleteParams
- type WorkflowsScheduleGetParams
- type WorkflowsScheduleNamespace
- func (n *WorkflowsScheduleNamespace) Delete(ctx context.Context, params WorkflowsScheduleDeleteParams, ...) (*OK, error)
- func (n *WorkflowsScheduleNamespace) Get(ctx context.Context, params WorkflowsScheduleGetParams, opts ...RequestOption) (*WorkflowScheduleResponse, error)
- func (n *WorkflowsScheduleNamespace) Update(ctx context.Context, params WorkflowsScheduleUpdateParams, ...) (*WorkflowScheduleResponse, error)
- type WorkflowsScheduleUpdateParams
Constants ¶
const APIVersion = "1.6.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.
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 ¶
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 ¶
AsAPIError reports whether err is, or wraps, an *APIError. It is a shorthand for errors.As with the right variable already declared.
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 ¶
func (n *APIKeysNamespace) Create(ctx context.Context, params APIKeysCreateParams, opts ...RequestOption) (*CreatedAPIKey, error)
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 ¶
func (n *APIKeysNamespace) Rotate(ctx context.Context, params APIKeysRotateParams, opts ...RequestOption) (*CreatedAPIKey, error)
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 {
// AccessRequests: `client.accessRequests`.
AccessRequests *AccessRequestsNamespace
// Accounts: `client.accounts`.
Accounts *AccountsNamespace
// Agents: `client.agents`.
Agents *AgentsNamespace
// AlertRules: `client.alertRules`.
AlertRules *AlertRulesNamespace
// 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
// Commitments: `client.commitments`.
Commitments *CommitmentsNamespace
// Config: `client.config`.
Config *ConfigNamespace
// Connect: `client.connect`.
Connect *ConnectNamespace
// CostAlerts: `client.costAlerts`.
CostAlerts *CostAlertsNamespace
// CostCentres: `client.costCentres`.
CostCentres *CostCentresNamespace
// CostExports: `client.costExports`.
CostExports *CostExportsNamespace
// CostReportFolders: `client.costReportFolders`.
CostReportFolders *CostReportFoldersNamespace
// CostReportNotifications: `client.costReportNotifications`.
CostReportNotifications *CostReportNotificationsNamespace
// CostReports: `client.costReports`.
CostReports *CostReportsNamespace
// Costs: `client.costs`.
Costs *CostsNamespace
// CredentialHygiene: `client.credentialHygiene`.
CredentialHygiene *CredentialHygieneNamespace
// Credits: `client.credits`.
Credits *CreditsNamespace
// Currency: `client.currency`.
Currency *CurrencyNamespace
// 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
// DNS: `client.dns`.
DNS *DNSNamespace
// Docker: `client.docker`.
Docker *DockerNamespace
// EnvironmentDiff: `client.environmentDiff`.
EnvironmentDiff *EnvironmentDiffNamespace
// Expiring: `client.expiring`.
Expiring *ExpiringNamespace
// Invitations: `client.invitations`.
Invitations *InvitationsNamespace
// Jira: `client.jira`.
Jira *JiraNamespace
// KV: `client.kv`.
KV *KVNamespace
// Leases: `client.leases`.
Leases *LeasesNamespace
// Linear: `client.linear`.
Linear *LinearNamespace
// 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
// Ownership: `client.ownership`.
Ownership *OwnershipNamespace
// Pages: `client.pages`.
Pages *PagesNamespace
// Posture: `client.posture`.
Posture *PostureNamespace
// Probes: `client.probes`.
Probes *ProbesNamespace
// Profile: `client.profile`.
Profile *ProfileNamespace
// Resources: `client.resources`.
Resources *ResourcesNamespace
// Rightsizing: `client.rightsizing`.
Rightsizing *RightsizingNamespace
// SavedCostFilters: `client.savedCostFilters`.
SavedCostFilters *SavedCostFiltersNamespace
// Schedules: `client.schedules`.
Schedules *SchedulesNamespace
// Search: `client.search`.
Search *SearchNamespace
// SessionRecordings: `client.sessionRecordings`.
SessionRecordings *SessionRecordingsNamespace
// 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
// Status: `client.status`.
Status *StatusNamespace
// StatusIncidents: `client.statusIncidents`.
StatusIncidents *StatusIncidentsNamespace
// StatusPages: `client.statusPages`.
StatusPages *StatusPagesNamespace
// 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 AccessDecision ¶ added in v0.43.0
type AccessDecision struct {
// Note: Shown on the request and in the audit log.
Note *string `json:"note,omitempty"`
}
AccessDecision is the `AccessDecision` schema.
type AccessDecisionConflict ¶ added in v0.43.0
type AccessDecisionConflict struct {
Error string `json:"error"`
}
AccessDecisionConflict is the `AccessDecisionConflict` schema.
type AccessDecisionForbidden ¶ added in v0.43.0
type AccessDecisionForbidden struct {
Error string `json:"error"`
// Code: One of "self_approval", "exceeds_approver".
Code string `json:"code"`
// Missing: For `exceeds_approver`: the permissions the approver does not
// hold.
Missing []string `json:"missing,omitempty"`
}
AccessDecisionForbidden is the `AccessDecisionForbidden` schema.
type AccessRequest ¶ added in v0.43.0
type AccessRequest struct {
ID string `json:"id"`
UserID string `json:"userId"`
UserName *string `json:"userName"`
// Permissions: The permission strings being asked for.
Permissions []string `json:"permissions"`
Reason string `json:"reason"`
// DurationMinutes: How long the elevation lasts once granted.
DurationMinutes int64 `json:"durationMinutes"`
// Status: `pending` (awaiting a decision), `approved`, `denied`, or
// `expired` (nobody decided in time, or the requester withdrew it). An
// approved row is only *granting* permissions while `active` is true.
//
// One of "pending", "approved", "denied", "expired".
Status string `json:"status"`
// ExpiresAt: When an undecided request stops being decidable.
ExpiresAt string `json:"expiresAt"`
DecidedAt *string `json:"decidedAt"`
DecidedByUserID *string `json:"decidedByUserId"`
DecidedByName *string `json:"decidedByName"`
DecisionNote *string `json:"decisionNote"`
GrantedAt *string `json:"grantedAt"`
// GrantExpiresAt: When the elevation lapses.
GrantExpiresAt *string `json:"grantExpiresAt"`
RevokedAt *string `json:"revokedAt"`
RevokedByName *string `json:"revokedByName"`
// Active: True when this row is granting permissions right now. Evaluated,
// never swept — a grant stops applying the instant it lapses.
Active bool `json:"active"`
CreatedAt string `json:"createdAt"`
}
AccessRequest is the `AccessRequest` schema.
type AccessRequestCatalog ¶ added in v0.43.0
type AccessRequestCatalog struct {
Permissions []string `json:"permissions"`
// Held: Permissions the caller already holds; asking for these changes
// nothing.
Held []string `json:"held"`
MinGrantMinutes int64 `json:"minGrantMinutes"`
MaxGrantMinutes int64 `json:"maxGrantMinutes"`
}
AccessRequestCatalog is the `AccessRequestCatalog` schema.
type AccessRequestCreate ¶ added in v0.43.0
type AccessRequestCreate struct {
Permissions []string `json:"permissions"`
Reason string `json:"reason"`
DurationMinutes int64 `json:"durationMinutes"`
}
AccessRequestCreate is the `AccessRequestCreate` schema.
type AccessRequestsApproveParams ¶ added in v0.43.0
type AccessRequestsApproveParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
RequestID string
// Body: the JSON request body.
Body *AccessDecision
}
AccessRequestsApproveParams holds the parameters for `client.accessRequests.approve`.
type AccessRequestsCatalogParams ¶ added in v0.43.0
type AccessRequestsCatalogParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
AccessRequestsCatalogParams holds the parameters for `client.accessRequests.catalog`.
Every field is optional; pass nil to take the defaults.
type AccessRequestsCreateParams ¶ added in v0.43.0
type AccessRequestsCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *AccessRequestCreate
}
AccessRequestsCreateParams holds the parameters for `client.accessRequests.create`.
Every field is optional; pass nil to take the defaults.
type AccessRequestsDenyParams ¶ added in v0.43.0
type AccessRequestsDenyParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
RequestID string
// Body: the JSON request body.
Body *AccessDecision
}
AccessRequestsDenyParams holds the parameters for `client.accessRequests.deny`.
type AccessRequestsListParams ¶ added in v0.43.0
type AccessRequestsListParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Status: `pending` (awaiting a decision), `approved`, `denied`, or
// `expired` (nobody decided in time, or the requester withdrew it). An
// approved row is only *granting* permissions while `active` is true.
//
// One of "pending", "approved", "denied", "expired".
Status *string
// Mine: Only the caller's own requests.
//
// One of "1".
Mine *string
// Active: Only rows granting permissions right now.
//
// One of "1".
Active *string
}
AccessRequestsListParams holds the parameters for `client.accessRequests.list`.
Every field is optional; pass nil to take the defaults.
type AccessRequestsNamespace ¶ added in v0.43.0
type AccessRequestsNamespace struct {
// contains filtered or unexported fields
}
AccessRequestsNamespace is `client.accessRequests`.
func (*AccessRequestsNamespace) Approve ¶ added in v0.43.0
func (n *AccessRequestsNamespace) Approve(ctx context.Context, params AccessRequestsApproveParams, opts ...RequestOption) (*AccessRequest, error)
Approve: Approve an access request
Opens the elevation window: the requester holds the requested permissions from now until `grantExpiresAt`, on every surface at once (HTTP, the WebSocket gateway, chat, MCP tools). Two rules are enforced here and cannot be bypassed: you cannot decide your own request (403 `self_approval`), and you cannot grant a permission you do not hold yourself (403 `exceeds_approver`) — denying something aimed higher than you is allowed. Deciding a request that has already been decided or has timed out is a 409. Audit-logged.
_Requires permission: `access:approve`._
POST /api/org/{orgId}/access-requests/{requestId}/approve
Raises on 400: Bad request
Raises on 403: Self-approval, or granting beyond the approver's own permissions
Raises on 404: Not found
Raises on 409: Already decided, or the request timed out
func (*AccessRequestsNamespace) Catalog ¶ added in v0.43.0
func (n *AccessRequestsNamespace) Catalog(ctx context.Context, params *AccessRequestsCatalogParams, opts ...RequestOption) (*AccessRequestCatalog, error)
Catalog: Permissions a request may ask for
The server's permission catalog plus the subset the caller already holds and the bounds on grant length. Served rather than hard-coded in clients so a picker cannot drift from what the server will accept.
_Requires permission: `access:read`._
GET /api/org/{orgId}/access-requests/catalog
func (*AccessRequestsNamespace) Create ¶ added in v0.43.0
func (n *AccessRequestsNamespace) Create(ctx context.Context, params *AccessRequestsCreateParams, opts ...RequestOption) (*AccessRequest, error)
Create: Request elevated access
Ask for specific permissions, for a specific number of minutes, with a reason. Rejected with 400 when the caller's role already grants every permission asked for — that is almost always a wrong permission string rather than a real request. Fans out to push, Slack (with Approve/Deny buttons) and Microsoft Teams under the Pages opt-in. Audit-logged.
_Requires permission: `access:request`._
POST /api/org/{orgId}/access-requests
Raises on 400: Bad request
func (*AccessRequestsNamespace) Deny ¶ added in v0.43.0
func (n *AccessRequestsNamespace) Deny(ctx context.Context, params AccessRequestsDenyParams, opts ...RequestOption) (*AccessRequest, error)
Deny: Deny an access request
Records the refusal. Two rules are enforced here and cannot be bypassed: you cannot decide your own request (403 `self_approval`), and you cannot grant a permission you do not hold yourself (403 `exceeds_approver`) — denying something aimed higher than you is allowed. Deciding a request that has already been decided or has timed out is a 409. Audit-logged.
_Requires permission: `access:approve`._
POST /api/org/{orgId}/access-requests/{requestId}/deny
Raises on 400: Bad request
Raises on 403: Self-approval, or granting beyond the approver's own permissions
Raises on 404: Not found
Raises on 409: Already decided, or the request timed out
func (*AccessRequestsNamespace) List ¶ added in v0.43.0
func (n *AccessRequestsNamespace) List(ctx context.Context, params *AccessRequestsListParams, opts ...RequestOption) ([]AccessRequest, error)
List: List access requests
The organization's break-glass requests, newest first. A `pending` listing hides rows whose timeout has already passed, so the queue never offers a decision that would immediately be refused.
_Requires permission: `access:read`._
GET /api/org/{orgId}/access-requests
Raises on 400: Bad request
func (*AccessRequestsNamespace) Revoke ¶ added in v0.43.0
func (n *AccessRequestsNamespace) Revoke(ctx context.Context, params AccessRequestsRevokeParams, opts ...RequestOption) (*AccessRequest, error)
Revoke: End a live elevation early
Allowed for anyone with `access:approve` and for the holder — giving back an elevation you no longer need must never require finding an approver. Applies from the next permission resolution; nothing is cached. Audit-logged.
POST /api/org/{orgId}/access-requests/{requestId}/revoke
Raises on 404: Not found
Raises on 409: The grant is not active
func (*AccessRequestsNamespace) Withdraw ¶ added in v0.43.0
func (n *AccessRequestsNamespace) Withdraw(ctx context.Context, params AccessRequestsWithdrawParams, opts ...RequestOption) (*OK, error)
Withdraw: Withdraw your own pending request
Its own operation rather than a self-denial, so the audit trail distinguishes 'nobody would approve this' from 'they decided they didn't need it'. Audit-logged.
_Requires permission: `access:request`._
POST /api/org/{orgId}/access-requests/{requestId}/withdraw
Raises on 404: Not found
Raises on 409: Already decided or expired
type AccessRequestsRevokeParams ¶ added in v0.43.0
type AccessRequestsRevokeParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
RequestID string
}
AccessRequestsRevokeParams holds the parameters for `client.accessRequests.revoke`.
type AccessRequestsWithdrawParams ¶ added in v0.43.0
type AccessRequestsWithdrawParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
RequestID string
}
AccessRequestsWithdrawParams holds the parameters for `client.accessRequests.withdraw`.
type AccessRevokeConflict ¶ added in v0.43.0
type AccessRevokeConflict struct {
Error string `json:"error"`
}
AccessRevokeConflict is the `AccessRevokeConflict` schema.
type AccessWithdrawConflict ¶ added in v0.43.0
type AccessWithdrawConflict struct {
Error string `json:"error"`
}
AccessWithdrawConflict is the `AccessWithdrawConflict` schema.
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 ¶
func (n *AccountsCredentialsNamespace) Get(ctx context.Context, params AccountsCredentialsGetParams, opts ...RequestOption) (map[string]string, error)
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 ¶
func (n *AccountsCredentialsNamespace) Update(ctx context.Context, params AccountsCredentialsUpdateParams, opts ...RequestOption) (*AccountsCredentialsUpdateResponse, error)
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 AccountsExportTerraformParams ¶ added in v1.3.0
type AccountsExportTerraformParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
AccountsExportTerraformParams holds the parameters for `client.accounts.exportTerraform`.
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 ¶
func (n *AccountsNamespace) Create(ctx context.Context, params AccountsCreateParams, opts ...RequestOption) (*CreateAccountResponse, error)
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 ¶
func (n *AccountsNamespace) Detail(ctx context.Context, params AccountsDetailParams, opts ...RequestOption) (*AccountDetail, error)
Detail: Account metadata + resource type list
_Requires permission: `accounts:read`._
GET /api/org/{orgId}/accounts/{id}/detail
Raises on 404: Not found
func (*AccountsNamespace) ExportTerraform ¶ added in v1.3.0
func (n *AccountsNamespace) ExportTerraform(ctx context.Context, params AccountsExportTerraformParams, opts ...RequestOption) (*TerraformExport, error)
ExportTerraform: Generate Terraform HCL for the account's stored inventory
_Requires permission: `resources:read`._
GET /api/org/{orgId}/accounts/{id}/export-terraform
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 ¶
func (n *AccountsNamespace) Sync(ctx context.Context, params AccountsSyncParams, opts ...RequestOption) (*SyncResponse, error)
Sync: Sync all resource types for an account
_Requires permission: `resources:read`._
POST /api/org/{orgId}/accounts/{id}/sync
func (*AccountsNamespace) Update ¶
func (n *AccountsNamespace) Update(ctx context.Context, params AccountsUpdateParams, opts ...RequestOption) (*UpdatedAccount, error)
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
func (n *AccountsPluginsNamespace) List(ctx context.Context, params *AccountsPluginsListParams, opts ...RequestOption) ([]PluginSummary, error)
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
func (n *AccountsPluginsNamespace) PolicyTemplate(ctx context.Context, params AccountsPluginsPolicyTemplateParams, opts ...RequestOption) (*PolicyTemplateResponse, error)
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
func (n *AccountsPreflightNamespace) Create(ctx context.Context, params AccountsPreflightCreateParams, opts ...RequestOption) (*PreflightReport, error)
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
func (n *AccountsPreflightNamespace) PostOrgOrgIDAccountsIDPreflight(ctx context.Context, params AccountsPreflightPostOrgOrgIDAccountsIDPreflightParams, opts ...RequestOption) (*PreflightReport, error)
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 ¶
func (n *AccountsSyncTypeNamespace) Create(ctx context.Context, params AccountsSyncTypeCreateParams, opts ...RequestOption) ([]SyncedResource, error)
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"`
// Surface: One of "terminal", "t3-code".
Surface *string `json:"surface,omitempty"`
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"`
// Surface: One of "terminal", "t3-code".
Surface *string `json:"surface,omitempty"`
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 ¶
func (n *AgentsSessionsNamespace) Create(ctx context.Context, params AgentsSessionsCreateParams, opts ...RequestOption) (*AgentSession, error)
Create: Create an agent session
_Requires permission: `resources:write`._
POST /api/org/{orgId}/agents/sessions
Raises on 400: Bad request
func (*AgentsSessionsNamespace) Delete ¶
func (n *AgentsSessionsNamespace) Delete(ctx context.Context, params AgentsSessionsDeleteParams, opts ...RequestOption) (*AgentsSessionsDeleteResponse, error)
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 ¶
func (n *AgentsSessionsNamespace) List(ctx context.Context, params *AgentsSessionsListParams, opts ...RequestOption) ([]AgentSession, error)
List: List agent sessions
_Requires permission: `resources:read`._
GET /api/org/{orgId}/agents/sessions
func (*AgentsSessionsNamespace) Open ¶
func (n *AgentsSessionsNamespace) Open(ctx context.Context, params AgentsSessionsOpenParams, opts ...RequestOption) (*AgentsSessionsOpenResponse, error)
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 ¶
func (n *AgentsSessionsNamespace) Reconcile(ctx context.Context, params AgentsSessionsReconcileParams, opts ...RequestOption) (*AgentsSessionsReconcileResponse, error)
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 ¶
func (n *AgentsSettingsNamespace) Get(ctx context.Context, params *AgentsSettingsGetParams, opts ...RequestOption) (*AgentSettings, error)
Get: Get saved Agents defaults
_Requires permission: `accounts:read`._
GET /api/org/{orgId}/agents/settings
func (*AgentsSettingsNamespace) Update ¶
func (n *AgentsSettingsNamespace) Update(ctx context.Context, params AgentsSettingsUpdateParams, opts ...RequestOption) (*AgentSettings, error)
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 AlertCondition ¶ added in v1.0.0
type AlertCondition = any
AlertCondition: One clause of a rule. A rule matches when every condition matches; 'or' is expressed by writing a second rule. A condition on a fact the alert does not carry never matches — in either direction, so `accountId notIn [x]` does not match an alert with no account.
type AlertDelivery ¶ added in v1.0.0
type AlertDelivery struct {
ID string `json:"id"`
Trigger AlertTrigger `json:"trigger"`
Severity AlertSeverity `json:"severity"`
Title string `json:"title"`
Body string `json:"body"`
RuleName *string `json:"ruleName"`
// State: One of "held", "awaiting_ack", "sent", "acknowledged", "escalated",
// "expired".
State string `json:"state"`
CreatedAt string `json:"createdAt"`
// DeliverAfter: When a quiet-hours hold is released.
DeliverAfter *string `json:"deliverAfter"`
// EscalateAt: When an unacknowledged alert escalates.
EscalateAt *string `json:"escalateAt"`
AcknowledgedAt *string `json:"acknowledgedAt"`
AcknowledgedByUserID *string `json:"acknowledgedByUserId"`
}
AlertDelivery is the `AlertDelivery` schema.
type AlertDestination ¶ added in v1.0.0
type AlertDestination = any
AlertDestination: One place a matched alert goes. `push` reaches the organization's phones, still filtered by each member's own mutes — an organization rule decides whether the org is told, a member decides whether their phone rings.
type AlertRule ¶ added in v1.0.0
type AlertRule struct {
ID string `json:"id"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
// Position: Ascending evaluation order
Position int64 `json:"position"`
Conditions []AlertCondition `json:"conditions"`
// Destinations: Empty is legal and meaningful: an enabled rule with no
// destinations swallows matching alerts and shadows the rules below it.
Destinations []AlertDestination `json:"destinations"`
// ContinueOnMatch: False (the default) makes the list first-match-wins,
// which is what lets a narrow rule sit above a broad one. True makes the
// rule a tee that copies without shadowing.
ContinueOnMatch bool `json:"continueOnMatch"`
QuietHours *QuietHours `json:"quietHours"`
Escalation *EscalationPolicy `json:"escalation"`
}
AlertRule is the `AlertRule` schema.
type AlertRuleInput ¶ added in v1.0.0
type AlertRuleInput struct {
// ID: Send the existing id to preserve it, which keeps in-flight held and
// escalating deliveries pointing at their rule.
ID *string `json:"id,omitempty"`
Name string `json:"name"`
Enabled *bool `json:"enabled,omitempty"`
Conditions []AlertCondition `json:"conditions,omitempty"`
Destinations []AlertDestination `json:"destinations,omitempty"`
ContinueOnMatch *bool `json:"continueOnMatch,omitempty"`
QuietHours *QuietHours `json:"quietHours,omitempty"`
Escalation *EscalationPolicy `json:"escalation,omitempty"`
}
AlertRuleInput is the `AlertRuleInput` schema.
type AlertRulesAdoptDefaultsParams ¶ added in v1.0.0
type AlertRulesAdoptDefaultsParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
AlertRulesAdoptDefaultsParams holds the parameters for `client.alertRules.adoptDefaults`.
Every field is optional; pass nil to take the defaults.
type AlertRulesAdoptDefaultsResponse ¶ added in v1.0.0
type AlertRulesAdoptDefaultsResponse struct {
Rules []AlertRule `json:"rules"`
Adopted bool `json:"adopted"`
}
AlertRulesAdoptDefaultsResponse is an object the spec declares inline.
type AlertRulesDeliveriesAckParams ¶ added in v1.0.0
type AlertRulesDeliveriesAckParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
AlertRulesDeliveriesAckParams holds the parameters for `client.alertRules.deliveries.ack`.
type AlertRulesDeliveriesAckResponse ¶ added in v1.0.0
type AlertRulesDeliveriesAckResponse struct {
Acknowledged bool `json:"acknowledged"`
AlreadyAcknowledgedBy *string `json:"alreadyAcknowledgedBy,omitempty"`
// Reason: Why the acknowledgement did not take. `not_pending` means the
// delivery exists but was never awaiting one — still held, already sent, or
// expired.
//
// One of "not_pending", "already_escalated", "already_acknowledged".
Reason *string `json:"reason,omitempty"`
Title *string `json:"title,omitempty"`
}
AlertRulesDeliveriesAckResponse is an object the spec declares inline.
type AlertRulesDeliveriesCancelParams ¶ added in v1.0.0
type AlertRulesDeliveriesCancelParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *AlertRulesDeliveriesCancelRequest
}
AlertRulesDeliveriesCancelParams holds the parameters for `client.alertRules.deliveries.cancel`.
Every field is optional; pass nil to take the defaults.
type AlertRulesDeliveriesCancelRequest ¶ added in v1.0.0
type AlertRulesDeliveriesCancelRequest struct {
IDs []string `json:"ids"`
}
AlertRulesDeliveriesCancelRequest is an object the spec declares inline.
type AlertRulesDeliveriesCancelResponse ¶ added in v1.0.0
type AlertRulesDeliveriesCancelResponse struct {
Cancelled int64 `json:"cancelled"`
}
AlertRulesDeliveriesCancelResponse is an object the spec declares inline.
type AlertRulesDeliveriesListParams ¶ added in v1.0.0
type AlertRulesDeliveriesListParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
Limit *int64
}
AlertRulesDeliveriesListParams holds the parameters for `client.alertRules.deliveries.list`.
Every field is optional; pass nil to take the defaults.
type AlertRulesDeliveriesNamespace ¶ added in v1.0.0
type AlertRulesDeliveriesNamespace struct {
// contains filtered or unexported fields
}
AlertRulesDeliveriesNamespace is `client.alertRules.deliveries`.
func (*AlertRulesDeliveriesNamespace) Ack ¶ added in v1.0.0
func (n *AlertRulesDeliveriesNamespace) Ack(ctx context.Context, params AlertRulesDeliveriesAckParams, opts ...RequestOption) (*AlertRulesDeliveriesAckResponse, error)
Ack: Acknowledge an alert, cancelling its escalation
A conditional update: only a delivery still in `awaiting_ack` can move, so two people pressing at once produce one acknowledgement and an alert that already escalated cannot be retroactively silenced.
POST /api/org/{orgId}/alert-rules/deliveries/{id}/ack
Raises on 401: Unauthenticated
Raises on 403: Forbidden
Raises on 404: Not found
func (*AlertRulesDeliveriesNamespace) Cancel ¶ added in v1.0.0
func (n *AlertRulesDeliveriesNamespace) Cancel(ctx context.Context, params *AlertRulesDeliveriesCancelParams, opts ...RequestOption) (*AlertRulesDeliveriesCancelResponse, error)
Cancel: Drop held or awaiting-acknowledgement deliveries
POST /api/org/{orgId}/alert-rules/deliveries/cancel
Raises on 400: Bad request
Raises on 403: Forbidden
func (*AlertRulesDeliveriesNamespace) List ¶ added in v1.0.0
func (n *AlertRulesDeliveriesNamespace) List(ctx context.Context, params *AlertRulesDeliveriesListParams, opts ...RequestOption) ([]AlertDelivery, error)
List: List recent held and escalating alerts
Only alerts a rule created follow-up work for appear here: one held by quiet hours, or one waiting on an acknowledgement. An alert that went straight out leaves no row.
GET /api/org/{orgId}/alert-rules/deliveries
Raises on 403: Forbidden
type AlertRulesGetParams ¶ added in v1.0.0
type AlertRulesGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
AlertRulesGetParams holds the parameters for `client.alertRules.get`.
Every field is optional; pass nil to take the defaults.
type AlertRulesNamespace ¶ added in v1.0.0
type AlertRulesNamespace struct {
// Deliveries: `client.alertRules.deliveries`.
Deliveries *AlertRulesDeliveriesNamespace
// contains filtered or unexported fields
}
AlertRulesNamespace is `client.alertRules`.
func (*AlertRulesNamespace) AdoptDefaults ¶ added in v1.0.0
func (n *AlertRulesNamespace) AdoptDefaults(ctx context.Context, params *AlertRulesAdoptDefaultsParams, opts ...RequestOption) (*AlertRulesAdoptDefaultsResponse, error)
AdoptDefaults: Persist the default rule so it can be edited
A no-op when the organization already has rules.
POST /api/org/{orgId}/alert-rules/adopt-defaults
Raises on 403: Forbidden
func (*AlertRulesNamespace) Get ¶ added in v1.0.0
func (n *AlertRulesNamespace) Get(ctx context.Context, params *AlertRulesGetParams, opts ...RequestOption) (*AlertRulesResponse, error)
Get: Get the organization's alert routing rules
Returns the rules in evaluation order, plus the channels and accounts a rule can name so a client can render destinations by name. An organization that has saved no rules gets the synthesized default with `usingDefaults: true`.
GET /api/org/{orgId}/alert-rules
Raises on 403: Forbidden
func (*AlertRulesNamespace) Update ¶ added in v1.0.0
func (n *AlertRulesNamespace) Update(ctx context.Context, params *AlertRulesUpdateParams, opts ...RequestOption) (*AlertRulesUpdateResponse, error)
Update: Replace the organization's alert routing rules
Whole-list replacement in one transaction. Order is part of the meaning — a rule is only correct relative to the ones above it — so a reorder applied as several requests would leave a window in which alerts route somewhere nobody asked for. Positions are re-derived from array order.
PUT /api/org/{orgId}/alert-rules
Raises on 400: Bad request
Raises on 403: Forbidden
type AlertRulesResponse ¶ added in v1.0.0
type AlertRulesResponse struct {
Rules []AlertRule `json:"rules"`
// UsingDefaults: True when the organization has saved no rules and `rules`
// is the synthesized default — everything except drift, to every connected
// channel and to mobile push.
UsingDefaults bool `json:"usingDefaults"`
SlackChannels []AlertRulesResponseSlackChannels `json:"slackChannels"`
MsTeamsWebhooks []AlertRulesResponseMsTeamsWebhooks `json:"msTeamsWebhooks"`
Accounts []AlertRulesResponseAccounts `json:"accounts"`
}
AlertRulesResponse is the `AlertRulesResponse` schema.
type AlertRulesResponseAccounts ¶ added in v1.0.0
type AlertRulesResponseAccounts struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
PluginID string `json:"pluginId"`
}
AlertRulesResponseAccounts is an object the spec declares inline.
type AlertRulesResponseMsTeamsWebhooks ¶ added in v1.0.0
AlertRulesResponseMsTeamsWebhooks is an object the spec declares inline.
type AlertRulesResponseSlackChannels ¶ added in v1.0.0
type AlertRulesResponseSlackChannels struct {
ID string `json:"id"`
Name string `json:"name"`
IsPrivate bool `json:"isPrivate"`
}
AlertRulesResponseSlackChannels is an object the spec declares inline.
type AlertRulesUpdateParams ¶ added in v1.0.0
type AlertRulesUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *AlertRulesUpdateRequest
}
AlertRulesUpdateParams holds the parameters for `client.alertRules.update`.
Every field is optional; pass nil to take the defaults.
type AlertRulesUpdateRequest ¶ added in v1.0.0
type AlertRulesUpdateRequest struct {
Rules []AlertRuleInput `json:"rules"`
}
AlertRulesUpdateRequest is an object the spec declares inline.
type AlertRulesUpdateResponse ¶ added in v1.0.0
type AlertRulesUpdateResponse struct {
Rules []AlertRule `json:"rules"`
}
AlertRulesUpdateResponse is an object the spec declares inline.
type AlertSeverity ¶ added in v1.0.0
type AlertSeverity = string
AlertSeverity: Alert severity, ordered info < warning < critical.
const ( AlertSeverityInfo AlertSeverity = "info" AlertSeverityWarning AlertSeverity = "warning" AlertSeverityCritical AlertSeverity = "critical" )
The values AlertSeverity takes.
type AlertTrigger ¶ added in v1.0.0
type AlertTrigger = string
AlertTrigger: A kind of alert that can be routed.
const ( AlertTriggerSyncIncidents AlertTrigger = "syncIncidents" AlertTriggerBudgetAlerts AlertTrigger = "budgetAlerts" AlertTriggerAnomalyAlerts AlertTrigger = "anomalyAlerts" AlertTriggerCostChangeAlerts AlertTrigger = "costChangeAlerts" AlertTriggerMetricAlerts AlertTrigger = "metricAlerts" AlertTriggerResourceDrift AlertTrigger = "resourceDrift" AlertTriggerWorkflowPages AlertTrigger = "workflowPages" AlertTriggerProviderIncidents AlertTrigger = "providerIncidents" AlertTriggerExpiryAlerts AlertTrigger = "expiryAlerts" AlertTriggerLogMatchAlerts AlertTrigger = "logMatchAlerts" AlertTriggerPostureAlerts AlertTrigger = "postureAlerts" AlertTriggerProbeAlerts AlertTrigger = "probeAlerts" AlertTriggerWeeklyDigest AlertTrigger = "weeklyDigest" )
The values AlertTrigger takes.
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 ¶
func (n *ArtifactsNamespace) List(ctx context.Context, params ArtifactsListParams, opts ...RequestOption) (JSONObject, error)
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 ¶
func (n *AssociationsNamespace) Create(ctx context.Context, params AssociationsCreateParams, opts ...RequestOption) (*OK, error)
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 ¶
func (n *AssociationsNamespace) Literal(ctx context.Context, params AssociationsLiteralParams, opts ...RequestOption) (*OK, error)
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 ¶
func (n *AuditLogsNamespace) Get(ctx context.Context, params *AuditLogsGetParams, opts ...RequestOption) (*AuditResponse, error)
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 ¶
func (n *BastionsNamespace) Create(ctx context.Context, params BastionsCreateParams, opts ...RequestOption) (*CreateBastionResponse, error)
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 BillingCapacityCheckoutParams ¶ added in v0.37.0
type BillingCapacityCheckoutParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *CapacityCheckoutRequest
}
BillingCapacityCheckoutParams holds the parameters for `client.billing.capacity.checkout`.
Every field is optional; pass nil to take the defaults.
type BillingCapacityNamespace ¶ added in v0.37.0
type BillingCapacityNamespace struct {
// contains filtered or unexported fields
}
BillingCapacityNamespace is `client.billing.capacity`.
func (*BillingCapacityNamespace) Checkout ¶ added in v0.37.0
func (n *BillingCapacityNamespace) Checkout(ctx context.Context, params *BillingCapacityCheckoutParams, opts ...RequestOption) (*StripeRedirectURL, error)
Checkout: Start a Stripe Checkout session for prepaid capacity slots
A capacity slot is one seat bought outright for a fixed term instead of rented monthly, and it grants paid-plan access on its own. This is a one-time payment, so the seats are granted by the `checkout.session.completed` webhook once Stripe confirms the payment — a 200 here only means the buyer was sent to a payment page. Rejected with 400 for complimentary organizations, and 503 when the deployment has no one-time capacity price configured.
POST /api/org/{orgId}/billing/capacity/checkout
Raises on 400: Bad request
Raises on 500: Server error
Raises on 503: A backing service this endpoint depends on is not available
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 {
// Capacity: `client.billing.capacity`.
Capacity *BillingCapacityNamespace
// contains filtered or unexported fields
}
BillingNamespace is `client.billing`.
func (*BillingNamespace) Checkout ¶
func (n *BillingNamespace) Checkout(ctx context.Context, params *BillingCheckoutParams, opts ...RequestOption) (*StripeRedirectURL, error)
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 ¶
func (n *BillingNamespace) Portal(ctx context.Context, params *BillingPortalParams, opts ...RequestOption) (*StripeRedirectURL, error)
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 ¶
func (n *BillingNamespace) Status(ctx context.Context, params *BillingStatusParams, opts ...RequestOption) (*BillingStatus, error)
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"`
Capacity CapacityStatus `json:"capacity"`
}
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 BudgetCostBasis ¶ added in v1.6.0
type BudgetCostBasis = string
BudgetCostBasis: The basis `actualCents` and `forecastCents` were measured on.
const ( BudgetCostBasisCash BudgetCostBasis = "cash" BudgetCostBasisAmortized BudgetCostBasis = "amortized" )
The values BudgetCostBasis takes.
type BudgetCostFilter ¶
type BudgetCostFilter struct {
// Dimension: One of "provider", "account", "service", "region", "resource",
// "tag", "charge_type", "commitment".
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"`
// SavedFilterID: A saved cost filter (see /saved-cost-filters) applied by
// reference and AND-composed with `filters` when the budget is evaluated.
// Updates are full replaces, so omitting it on PUT clears it. A reference
// that fails to resolve errors the budget's evaluation rather than silently
// measuring all spend.
SavedFilterID *string `json:"savedFilterId"`
Thresholds []BudgetThreshold `json:"thresholds"`
CostBasis BudgetCostBasis `json:"costBasis"`
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"`
// SavedFilterID: A saved cost filter (see /saved-cost-filters) applied by
// reference and AND-composed with `filters` when the budget is evaluated.
// Updates are full replaces, so omitting it on PUT clears it. A reference
// that fails to resolve errors the budget's evaluation rather than silently
// measuring all spend.
SavedFilterID *string `json:"savedFilterId,omitempty"`
Thresholds []BudgetThreshold `json:"thresholds"`
CostBasis *BudgetCostBasis `json:"costBasis,omitempty"`
}
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"`
CostBasis BudgetCostBasis `json:"costBasis"`
// SavedFilterID: A saved cost filter (see /saved-cost-filters) applied by
// reference and AND-composed with `filters` when the budget is evaluated.
// Updates are full replaces, so omitting it on PUT clears it. A reference
// that fails to resolve errors the budget's evaluation rather than silently
// measuring all spend.
SavedFilterID *string `json:"savedFilterId"`
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 ¶
func (n *BudgetsNamespace) Create(ctx context.Context, params BudgetsCreateParams, opts ...RequestOption) (*BudgetFull, error)
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 ¶
func (n *BudgetsNamespace) Events(ctx context.Context, params BudgetsEventsParams, opts ...RequestOption) ([]BudgetAlertEvent, error)
Events: Alert event history for a budget
GET /api/org/{orgId}/budgets/{id}/events
Raises on 404: Not found
func (*BudgetsNamespace) Get ¶
func (n *BudgetsNamespace) Get(ctx context.Context, params BudgetsGetParams, opts ...RequestOption) (*BudgetFull, error)
Get: Get a budget with current-month status
GET /api/org/{orgId}/budgets/{id}
Raises on 404: Not found
func (*BudgetsNamespace) List ¶
func (n *BudgetsNamespace) List(ctx context.Context, params *BudgetsListParams, opts ...RequestOption) ([]BudgetWithStatus, error)
List: List budgets with current-month actuals and forecasts
GET /api/org/{orgId}/budgets
func (*BudgetsNamespace) Update ¶
func (n *BudgetsNamespace) Update(ctx context.Context, params BudgetsUpdateParams, opts ...RequestOption) (*BudgetFull, error)
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 CapacityCheckoutRequest ¶ added in v0.37.0
type CapacityCheckoutRequest struct {
// Quantity: Slots to buy. Defaults to 1. The buyer can still adjust it in
// Checkout.
Quantity *int64 `json:"quantity,omitempty"`
}
CapacityCheckoutRequest is the `CapacityCheckoutRequest` schema.
type CapacitySlot ¶ added in v0.37.0
type CapacitySlot struct {
ID string `json:"id"`
// Quantity: Seats this purchase grants for the whole of its term.
Quantity int64 `json:"quantity"`
// Status: A slot is only granting capacity when it is `active` AND
// `expiresAt` is still in the future.
//
// One of "active", "refunded".
Status string `json:"status"`
StartsAt string `json:"startsAt"`
ExpiresAt string `json:"expiresAt"`
TermMonths int64 `json:"termMonths"`
AmountPaidCents *int64 `json:"amountPaidCents"`
}
CapacitySlot is the `CapacitySlot` schema.
type CapacityStatus ¶ added in v0.37.0
type CapacityStatus struct {
// Purchasable: False when this deployment has no one-time capacity price
// configured; the purchase route returns 503 and clients should hide the
// offer.
Purchasable bool `json:"purchasable"`
TermMonths int64 `json:"termMonths"`
// PriceUsd: List price of one slot in whole dollars, for display copy.
PriceUsd int64 `json:"priceUsd"`
// Seats: Seats from slots still inside their term, excluding lapsed and
// refunded. ADDITIONAL to `subscription.seatCount` — an org's capacity is
// the two summed, and an org can hold slots with no subscription at all.
Seats int64 `json:"seats"`
// Slots: Every purchase ever made, newest first, including lapsed and
// refunded.
Slots []CapacitySlot `json:"slots"`
}
CapacityStatus is the `CapacityStatus` schema.
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
func (n *ChangeFreezesNamespace) Create(ctx context.Context, params ChangeFreezesCreateParams, opts ...RequestOption) (*ChangeFreeze, error)
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
func (n *ChangeFreezesNamespace) Delete(ctx context.Context, params ChangeFreezesDeleteParams, opts ...RequestOption) (*OK, error)
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
func (n *ChangeFreezesNamespace) End(ctx context.Context, params ChangeFreezesEndParams, opts ...RequestOption) (*ChangeFreeze, error)
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
func (n *ChangeFreezesNamespace) List(ctx context.Context, params *ChangeFreezesListParams, opts ...RequestOption) ([]ChangeFreeze, error)
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
func (n *ChangeFreezesNamespace) Status(ctx context.Context, params *ChangeFreezesStatusParams, opts ...RequestOption) (*ChangeFreezeStatus, error)
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
func (n *ChangeFreezesNamespace) Update(ctx context.Context, params ChangeFreezesUpdateParams, opts ...RequestOption) (*ChangeFreeze, error)
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
func (n *ChangesAlertSettingsNamespace) Get(ctx context.Context, params *ChangesAlertSettingsGetParams, opts ...RequestOption) (*DriftAlertSettings, error)
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
func (n *ChangesAlertSettingsNamespace) Update(ctx context.Context, params *ChangesAlertSettingsUpdateParams, opts ...RequestOption) (*DriftAlertSettings, error)
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
func (n *ChangesNamespace) Get(ctx context.Context, params *ChangesGetParams, opts ...RequestOption) (*ResourceChangeFeedResponse, error)
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
func (n *ChangesNamespace) Resource(ctx context.Context, params ChangesResourceParams, opts ...RequestOption) (*ResourceChangeListResponse, error)
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 CommitmentCoverage ¶ added in v1.6.0
type CommitmentCoverage struct {
// Available: False when every in-scope account was excluded — 'we cannot
// tell' reported as unavailable, never as 0%.
Available bool `json:"available"`
Currencies []CommitmentCoverageCurrency `json:"currencies"`
// ExcludedAccountIDs: Accounts whose plugin cannot tell usage from other
// charge types; their rows would drag coverage down for reasons unrelated to
// purchasing.
ExcludedAccountIDs []string `json:"excludedAccountIds"`
}
CommitmentCoverage is the `CommitmentCoverage` schema.
type CommitmentCoverageCurrency ¶ added in v1.6.0
type CommitmentCoverageCurrency struct {
Currency string `json:"currency"`
// CoveredAmount: Usage spend on rows stamped with a commitment id.
CoveredAmount float64 `json:"coveredAmount"`
UncoveredAmount float64 `json:"uncoveredAmount"`
// UncoveredEligibleAmount: Uncovered usage in cells where a commitment
// landed in the window — provider evidence of committability, not a
// hand-maintained service table.
UncoveredEligibleAmount float64 `json:"uncoveredEligibleAmount"`
// BroadRatio: Lower bound: covered ÷ (covered + all uncovered usage).
BroadRatio *float64 `json:"broadRatio"`
// NarrowRatio: Upper bound: covered ÷ (covered + uncovered usage in eligible
// cells).
NarrowRatio *float64 `json:"narrowRatio"`
}
CommitmentCoverageCurrency is the `CommitmentCoverageCurrency` schema.
type CommitmentHolding ¶ added in v1.6.0
type CommitmentHolding struct {
AccountID string `json:"accountId"`
AccountName string `json:"accountName"`
PluginID PluginID `json:"pluginId"`
// CommitmentID: Provider-native id — the join key against cost rows'
// commitment dimension (an ARN where billing data carries ARNs, the bare id
// where it does not).
CommitmentID string `json:"commitmentId"`
// Kind: One of "reservation", "savings_plan", "committed_use".
Kind string `json:"kind"`
Description string `json:"description"`
// Scope: Provider scope qualifier — an AZ, an instance family, 'Shared'.
Scope *string `json:"scope"`
// Region: Null means the commitment applies across regions (an AWS Compute
// Savings Plan) — a real state, rendered as 'All regions', not missing data.
Region *string `json:"region"`
StartDate *string `json:"startDate"`
EndDate *string `json:"endDate"`
// TermDays: Provider-reported term length — never derived from the dates,
// which stop spanning the term once a commitment is split or merged.
TermDays *int64 `json:"termDays"`
// PaymentOption: One of "all_upfront", "partial_upfront", "no_upfront",
// "monthly".
PaymentOption *string `json:"paymentOption"`
// Currency: Null when the provider reports no money at all for this record.
Currency *string `json:"currency"`
// UpfrontAmount: Null means the provider did not report a price (Azure's
// list API reports none) — 'not reported', never rendered as 'free'.
UpfrontAmount *float64 `json:"upfrontAmount"`
RecurringAmount *float64 `json:"recurringAmount"`
// RecurringPeriod: Atomic with recurringAmount: an amount without a period
// is a 730× ambiguity.
//
// One of "hour", "month".
RecurringPeriod *string `json:"recurringPeriod"`
// HourlyCommitmentAmount: Committed spend per hour — what utilization is
// measured against.
HourlyCommitmentAmount *float64 `json:"hourlyCommitmentAmount"`
// UnitCommitments: Committed resource quantities for unit-denominated
// commitments (GCP CUDs). A record has either this or hourlyCommitmentAmount
// — the split decides which utilization question is even askable.
UnitCommitments []CommitmentUnitAmount `json:"unitCommitments"`
// State: One of "active", "expired", "queued".
State string `json:"state"`
// ProviderUtilization: The provider's own utilization aggregates (Azure
// reservations only), verbatim — never blended with the derived utilization
// below.
ProviderUtilization []CommitmentProviderUtilization `json:"providerUtilization"`
LastSeenAt string `json:"lastSeenAt"`
Utilization CommitmentUtilization `json:"utilization"`
}
CommitmentHolding is the `CommitmentHolding` schema.
type CommitmentPlanner ¶ added in v1.6.0
type CommitmentPlanner struct {
// Available: False when the data window is under the 60-day minimum.
Available bool `json:"available"`
WindowDayCount int64 `json:"windowDayCount"`
Recommendations []CommitmentRecommendation `json:"recommendations"`
Rejected []CommitmentRejectedCell `json:"rejected"`
}
CommitmentPlanner is the `CommitmentPlanner` schema.
type CommitmentPollFailure ¶ added in v1.6.0
type CommitmentPollFailure struct {
AccountID string `json:"accountId"`
AccountName string `json:"accountName"`
PluginID PluginID `json:"pluginId"`
Message string `json:"message"`
FailureCount int64 `json:"failureCount"`
}
CommitmentPollFailure is the `CommitmentPollFailure` schema.
type CommitmentProviderUtilization ¶ added in v1.6.0
type CommitmentProviderUtilization struct {
// GrainDays: Trailing window the aggregate covers (1, 7, 30).
GrainDays int64 `json:"grainDays"`
// Percentage: Utilization percentage 0–100, exactly as the provider reports
// it.
Percentage float64 `json:"percentage"`
}
CommitmentProviderUtilization is the `CommitmentProviderUtilization` schema.
type CommitmentRecommendation ¶ added in v1.6.0
type CommitmentRecommendation struct {
PluginID PluginID `json:"pluginId"`
Service string `json:"service"`
Region string `json:"region"`
Currency string `json:"currency"`
// RecommendedDailyCommitment: p10 of daily uncovered usage spend,
// nearest-rank — the floor, not the average.
RecommendedDailyCommitment float64 `json:"recommendedDailyCommitment"`
RecommendedHourlyCommitment float64 `json:"recommendedHourlyCommitment"`
AnnualCommitment float64 `json:"annualCommitment"`
P50DailySpend float64 `json:"p50DailySpend"`
// SavingBasis: Published discounts are "up to" figures. `range` renders
// "$X–$Y"; `upper_bound` renders "up to $Y" — never a bare "$Y".
//
// One of "range", "upper_bound".
SavingBasis string `json:"savingBasis"`
DiscountRateMin *float64 `json:"discountRateMin,omitempty"`
DiscountRateMax float64 `json:"discountRateMax"`
EstimatedAnnualSavingMin *float64 `json:"estimatedAnnualSavingMin,omitempty"`
EstimatedAnnualSavingMax float64 `json:"estimatedAnnualSavingMax"`
// BreakEvenUtilization: 1 − discount: below this utilization the commitment
// loses to on-demand. Equivalently, the workload can shrink by the discount
// before committing was a mistake.
BreakEvenUtilization float64 `json:"breakEvenUtilization"`
// AnnualLossIfUsageHalves: max(0, annualCommitment × (0.5 − discount)) at
// the shallow end of the published discount — a ceiling on regret where no
// floor rate is published.
AnnualLossIfUsageHalves float64 `json:"annualLossIfUsageHalves"`
}
CommitmentRecommendation is the `CommitmentRecommendation` schema.
type CommitmentRejectedCell ¶ added in v1.6.0
type CommitmentRejectedCell struct {
PluginID PluginID `json:"pluginId"`
Service string `json:"service"`
Region string `json:"region"`
Currency string `json:"currency"`
// Gate: First gate the cell failed, in evaluation order — the most
// actionable objection.
//
// One of "presence", "not_in_decline", "floor", "materiality".
Gate string `json:"gate"`
}
CommitmentRejectedCell is the `CommitmentRejectedCell` schema.
type CommitmentUnitAmount ¶ added in v1.6.0
type CommitmentUnitAmount struct {
// Unit: Provider-native unit label, untranslated — "VCPU", "MEMORY_MB",
// "LOCAL_SSD_GB".
Unit string `json:"unit"`
Amount float64 `json:"amount"`
}
CommitmentUnitAmount is the `CommitmentUnitAmount` schema.
type CommitmentUtilization ¶ added in v1.6.0
type CommitmentUtilization struct {
// Utilization: delivered ÷ obligation, unclamped (values above 1 mean spend
// past the commitment). **Null means not measurable** — never 0, which would
// read as 'unused'; the reason field says why.
Utilization *float64 `json:"utilization"`
// Reason: Why utilization is null: `unit_denominated` — the commitment is in
// resource units (GCP CUDs) and cost rows cannot say how many ran;
// `no_active_days` — the term does not intersect the window; `no_data_days`
// — no cost data was collected on any active day; `unattributed_rows` — the
// account's plugin does not stamp commitment ids onto cost rows, so
// delivered spend would falsely read as zero.
//
// One of "unit_denominated", "no_active_days", "no_data_days",
// "unattributed_rows".
Reason *string `json:"reason,omitempty"`
// ObligationAmount: hourlyCommitmentAmount × 24 × measuredDays, in the
// commitment's currency.
ObligationAmount *float64 `json:"obligationAmount"`
DeliveredAmount float64 `json:"deliveredAmount"`
// ActiveDays: Days of the window the commitment was active.
ActiveDays int64 `json:"activeDays"`
// MeasuredDays: Active days with cost data — the only days in the
// obligation. Counting a day the collection never ran would make a
// fully-used plan read as under-utilized.
MeasuredDays int64 `json:"measuredDays"`
// MissingDays: Active days without cost data, reported rather than silently
// counted.
MissingDays int64 `json:"missingDays"`
WindowDays int64 `json:"windowDays"`
}
CommitmentUtilization is the `CommitmentUtilization` schema.
type CommitmentsFeed ¶ added in v1.6.0
type CommitmentsFeed struct {
Holdings []CommitmentHolding `json:"holdings"`
Coverage CommitmentCoverage `json:"coverage"`
Planner CommitmentPlanner `json:"planner"`
Failures []CommitmentPollFailure `json:"failures"`
// PendingAccountIDs: Commitment-capable accounts never yet collected — named
// rather than omitted.
PendingAccountIDs []string `json:"pendingAccountIds"`
UtilizationWindowDays int64 `json:"utilizationWindowDays"`
PlannerWindowDays int64 `json:"plannerWindowDays"`
}
CommitmentsFeed is the `CommitmentsFeed` schema.
type CommitmentsGetParams ¶ added in v1.6.0
type CommitmentsGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
CommitmentsGetParams holds the parameters for `client.commitments.get`.
Every field is optional; pass nil to take the defaults.
type CommitmentsNamespace ¶ added in v1.6.0
type CommitmentsNamespace struct {
// contains filtered or unexported fields
}
CommitmentsNamespace is `client.commitments`.
func (*CommitmentsNamespace) Get ¶ added in v1.6.0
func (n *CommitmentsNamespace) Get(ctx context.Context, params *CommitmentsGetParams, opts ...RequestOption) (*CommitmentsFeed, error)
Get: Reservations, savings plans and committed-use discounts
The organization's purchased commitments — reserved instances, savings plans, committed-use discounts — with three derived readings.
**Coverage** is a range, not a number: the broad ratio counts every uncovered usage dollar in the denominator (a lower bound — egress and per-request charges can never be committed against), the narrow ratio only uncovered usage in cells where a commitment demonstrably landed (an upper bound). Accounts whose plugin cannot distinguish charge types are excluded and listed; a scope where every account is excluded reports unavailable, not 0%.
**Utilization** is measured only over days cost data was actually collected — a collection gap is reported as missing days, never counted as idle commitment. Unit-denominated commitments (GCP) report null with a reason, never 0%. Azure's own reported utilization rides on each holding separately and is never blended with the derived figure.
**The planner** recommends committing at the p10 floor of daily uncovered spend, gated on presence, trend, floor and materiality. Savings are quoted against published "up to" discount rates and marked as such. Nothing is ever purchased automatically.
_Requires permission: `costs:read`._
GET /api/org/{orgId}/commitments
type ConfigApplyParams ¶ added in v1.2.0
type ConfigApplyParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body OrgConfigRequest
}
ConfigApplyParams holds the parameters for `client.config.apply`.
type ConfigExportParams ¶ added in v1.2.0
type ConfigExportParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Sections: Comma-separated subset of sections to export. Defaults to all
// of: budgets, customGraphs, workflows, dashboards, metricAlerts, probes,
// costCentres, tagPolicy, alertSettings.
Sections *string
}
ConfigExportParams holds the parameters for `client.config.export`.
Every field is optional; pass nil to take the defaults.
type ConfigNamespace ¶ added in v1.2.0
type ConfigNamespace struct {
// contains filtered or unexported fields
}
ConfigNamespace is `client.config`.
func (*ConfigNamespace) Apply ¶ added in v1.2.0
func (n *ConfigNamespace) Apply(ctx context.Context, params ConfigApplyParams, opts ...RequestOption) (*OrgConfigApplyResult, error)
Apply: Apply a configuration document
Applies the document in a single transaction and returns the plan that was executed — all or nothing, so a failure never leaves the organization halfway between two configurations.
Requires the write permission of every section the document carries, so this cannot be used to reach past a role that withholds one.
_Requires permission: `config:write`._
POST /api/org/{orgId}/config/apply
Raises on 400: Bad request
Raises on 402: Payment required — the organization's plan does not include this
Raises on 403: Forbidden
func (*ConfigNamespace) Export ¶ added in v1.2.0
func (n *ConfigNamespace) Export(ctx context.Context, params *ConfigExportParams, opts ...RequestOption) (*OrgConfigDocument, error)
Export: Export the organization's configuration as one document
Dashboards, workflows, custom graphs, budgets, metric alerts, synthetic probes, cost centres, the tag policy and the org-wide alert settings, addressed by stable keys rather than row ids so the result applies to any organization.
Credentials, accounts, resources and workflow signing secrets are never included. Ordering is stable, so re-exporting an unchanged organization produces the same bytes — commit it to git and the diff is the change.
Requires the read permission of every section exported; it refuses rather than silently omitting one, because a partial document applied in `replace` mode would delete what the exporter could not see.
_Requires permission: `config:read`._
GET /api/org/{orgId}/config/export
Raises on 400: Bad request
Raises on 403: Forbidden
func (*ConfigNamespace) Plan ¶ added in v1.2.0
func (n *ConfigNamespace) Plan(ctx context.Context, params ConfigPlanParams, opts ...RequestOption) (*OrgConfigPlan, error)
Plan: Preview what applying a document would do
The dry run: validates the document, resolves its cross-references against this organization, and returns the create/update/delete/unchanged plan without writing anything. Read-only, so a reviewer with read access can run it on a pull request.
_Requires permission: `config:read`._
POST /api/org/{orgId}/config/plan
Raises on 400: Bad request
Raises on 403: Forbidden
type ConfigPlanParams ¶ added in v1.2.0
type ConfigPlanParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body OrgConfigRequest
}
ConfigPlanParams holds the parameters for `client.config.plan`.
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 ¶
func (n *ConnectNamespace) Templates(ctx context.Context, params ConnectTemplatesParams, opts ...RequestOption) (*ConnectTemplatesResponse, error)
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"`
// ChargeTypes: Whether this account's plugin can tell one kind of charge
// from another. False means every row it writes is recorded as `usage` — not
// that the provider only bills usage.
ChargeTypes bool `json:"chargeTypes"`
// Amortization: Whether this account's plugin reports an amortized amount
// distinct from the cash amount. Clients offer the amortized cost basis only
// when at least one account says yes; elsewhere the amortized view is the
// cash numbers under another name.
Amortization bool `json:"amortization"`
// Estimated: Whether this account's amounts are derived by Infrawrench —
// inventory priced against a rate card, or metered usage priced at published
// list rates — rather than reported as billed spend. True means the series
// cannot be reconciled against an invoice: resources deleted part-way
// through a period are no longer in inventory to be priced, all rates are
// list rather than negotiated, and credits, tax and refunds never appear.
Estimated bool `json:"estimated"`
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 ¶
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 CostAlert ¶ added in v1.6.0
type CostAlert struct {
ID string `json:"id"`
Name string `json:"name"`
Filters []CostAlertFilter `json:"filters"`
// GroupBy: Per-group fan-out. Null watches the scope's one total; a
// dimension watches each group against its own prior window, and each
// offending group fires its own event.
//
// One of "provider", "account", "service", "region", "resource", "tag",
// "charge_type", "commitment".
GroupBy *string `json:"groupBy"`
GroupByTagKey *string `json:"groupByTagKey"`
Cadence CostChangeCadence `json:"cadence"`
ThresholdPercent *int64 `json:"thresholdPercent"`
ThresholdAmountCents *int64 `json:"thresholdAmountCents"`
Direction CostChangeDirection `json:"direction"`
Enabled bool `json:"enabled"`
LastEvaluatedAt *string `json:"lastEvaluatedAt"`
LastFiredAt *string `json:"lastFiredAt"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
CostAlert: A change-based cost alert: fires when spend on its scope moves more than the configured threshold versus the prior period. The third alert family alongside budgets (absolute monthly total) and anomaly detection (statistical outliers against a learned baseline).
type CostAlertEvent ¶ added in v1.6.0
type CostAlertEvent struct {
ID string `json:"id"`
AlertID string `json:"alertId"`
AlertName string `json:"alertName"`
// PeriodKey: The cadence period the firing belongs to — a day, an ISO week
// (2026-W32) or a month (2026-08). One period fires at most once per group
// and currency.
PeriodKey string `json:"periodKey"`
WindowFrom string `json:"windowFrom"`
WindowTo string `json:"windowTo"`
PreviousFrom string `json:"previousFrom"`
PreviousTo string `json:"previousTo"`
// GroupKey: The offending group; empty when the alert watches one total.
GroupKey string `json:"groupKey"`
Currency string `json:"currency"`
PreviousAmountCents int64 `json:"previousAmountCents"`
CurrentAmountCents int64 `json:"currentAmountCents"`
// ChangePercent: Signed percent change. Null when the prior window had no
// spend at all (new spend — the change is infinite); -100 when the group
// vanished.
ChangePercent *int64 `json:"changePercent"`
// Direction: One of "increase", "decrease".
Direction string `json:"direction"`
FiredAt string `json:"firedAt"`
NotifiedAt *string `json:"notifiedAt"`
}
CostAlertEvent is the `CostAlertEvent` schema.
type CostAlertFilter ¶ added in v1.6.0
type CostAlertFilter struct {
// Dimension: One of "provider", "account", "service", "region", "resource",
// "tag", "charge_type", "commitment".
Dimension string `json:"dimension"`
// Op: One of "in", "not_in".
Op string `json:"op"`
Values []string `json:"values"`
TagKey *string `json:"tagKey,omitempty"`
}
CostAlertFilter is the `CostAlertFilter` schema.
type CostAlertInput ¶ added in v1.6.0
type CostAlertInput struct {
Name string `json:"name"`
Filters []CostAlertFilter `json:"filters,omitempty"`
// GroupBy: Per-group fan-out. Null watches the scope's one total; a
// dimension watches each group against its own prior window, and each
// offending group fires its own event.
//
// One of "provider", "account", "service", "region", "resource", "tag",
// "charge_type", "commitment".
GroupBy *string `json:"groupBy,omitempty"`
// GroupByTagKey: Required when groupBy is tag.
GroupByTagKey *string `json:"groupByTagKey,omitempty"`
Cadence CostChangeCadence `json:"cadence"`
// ThresholdPercent: Percent of the prior window's spend the change must
// reach. At least one of the two thresholds must be set; when both are, BOTH
// must hold before the alert fires.
ThresholdPercent *int64 `json:"thresholdPercent,omitempty"`
// ThresholdAmountCents: Cents the change must reach.
ThresholdAmountCents *int64 `json:"thresholdAmountCents,omitempty"`
Direction CostChangeDirection `json:"direction"`
Enabled *bool `json:"enabled,omitempty"`
}
CostAlertInput is the `CostAlertInput` schema.
type CostAlertsCreateParams ¶ added in v1.6.0
type CostAlertsCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body CostAlertInput
}
CostAlertsCreateParams holds the parameters for `client.costAlerts.create`.
type CostAlertsDeleteParams ¶ added in v1.6.0
type CostAlertsDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostAlertsDeleteParams holds the parameters for `client.costAlerts.delete`.
type CostAlertsEventsParams ¶ added in v1.6.0
type CostAlertsEventsParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
AlertID *string
Limit *int64
}
CostAlertsEventsParams holds the parameters for `client.costAlerts.events`.
Every field is optional; pass nil to take the defaults.
type CostAlertsEventsResponse ¶ added in v1.6.0
type CostAlertsEventsResponse struct {
Events []CostAlertEvent `json:"events"`
}
CostAlertsEventsResponse is an object the spec declares inline.
type CostAlertsGetGetOrgOrgIDCostAlertsIDParams ¶ added in v1.6.0
type CostAlertsGetGetOrgOrgIDCostAlertsIDParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostAlertsGetGetOrgOrgIDCostAlertsIDParams holds the parameters for `client.costAlerts.get.getOrgOrgIdCostAlertsId`.
type CostAlertsGetGetParams ¶ added in v1.6.0
type CostAlertsGetGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
CostAlertsGetGetParams holds the parameters for `client.costAlerts.get.get`.
Every field is optional; pass nil to take the defaults.
type CostAlertsGetGetResponse ¶ added in v1.6.0
type CostAlertsGetGetResponse struct {
Alerts []CostAlert `json:"alerts"`
}
CostAlertsGetGetResponse is an object the spec declares inline.
type CostAlertsGetNamespace ¶ added in v1.6.0
type CostAlertsGetNamespace struct {
// contains filtered or unexported fields
}
CostAlertsGetNamespace is `client.costAlerts.get`.
func (*CostAlertsGetNamespace) Get ¶ added in v1.6.0
func (n *CostAlertsGetNamespace) Get(ctx context.Context, params *CostAlertsGetGetParams, opts ...RequestOption) (*CostAlertsGetGetResponse, error)
Get: List change-based cost alerts
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-alerts
func (*CostAlertsGetNamespace) GetOrgOrgIDCostAlertsID ¶ added in v1.6.0
func (n *CostAlertsGetNamespace) GetOrgOrgIDCostAlertsID(ctx context.Context, params CostAlertsGetGetOrgOrgIDCostAlertsIDParams, opts ...RequestOption) (*CostAlert, error)
GetOrgOrgIDCostAlertsID: Get a cost alert
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-alerts/{id}
Raises on 404: Not found
type CostAlertsNamespace ¶ added in v1.6.0
type CostAlertsNamespace struct {
// Get: `client.costAlerts.get`.
Get *CostAlertsGetNamespace
// contains filtered or unexported fields
}
CostAlertsNamespace is `client.costAlerts`.
func (*CostAlertsNamespace) Create ¶ added in v1.6.0
func (n *CostAlertsNamespace) Create(ctx context.Context, params CostAlertsCreateParams, opts ...RequestOption) (*CostAlert, error)
Create: Create a change-based cost alert
_Requires permission: `costs:write`._
POST /api/org/{orgId}/cost-alerts
Raises on 400: Bad request
func (*CostAlertsNamespace) Delete ¶ added in v1.6.0
func (n *CostAlertsNamespace) Delete(ctx context.Context, params CostAlertsDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Delete a cost alert
Soft delete. Fired events disappear from the org-wide event feed with it.
_Requires permission: `costs:write`._
DELETE /api/org/{orgId}/cost-alerts/{id}
Raises on 404: Not found
func (*CostAlertsNamespace) Events ¶ added in v1.6.0
func (n *CostAlertsNamespace) Events(ctx context.Context, params *CostAlertsEventsParams, opts ...RequestOption) (*CostAlertsEventsResponse, error)
Events: List recently fired cost-alert events
Newest first. Optionally scoped to one alert with ?alertId=; an unknown alertId is a 404, distinct from an alert that simply has no events yet.
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-alerts/events
Raises on 400: Bad request
Raises on 404: Not found
func (*CostAlertsNamespace) Update ¶ added in v1.6.0
func (n *CostAlertsNamespace) Update(ctx context.Context, params CostAlertsUpdateParams, opts ...RequestOption) (*CostAlert, error)
Update: Update a cost alert
_Requires permission: `costs:write`._
PUT /api/org/{orgId}/cost-alerts/{id}
Raises on 400: Bad request
Raises on 404: Not found
type CostAlertsUpdateParams ¶ added in v1.6.0
type CostAlertsUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
// Body: the JSON request body.
Body CostAlertInput
}
CostAlertsUpdateParams holds the parameters for `client.costAlerts.update`.
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 CostBasis ¶ added in v1.6.0
type CostBasis = string
CostBasis: Which number to sum. `cash` is what the provider charged on the day it charged it — the default, and what every query returned before this existed. `amortized` spreads a commitment's up-front fee across the term it buys, so a year of capacity bought on one day is counted on the days it covers. Providers that report no amortized amount fall back to their cash amount, so an amortized query over a mixed estate never drops their spend.
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
func (n *CostCentresNamespace) Create(ctx context.Context, params CostCentresCreateParams, opts ...RequestOption) (*CostCentre, error)
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
func (n *CostCentresNamespace) Delete(ctx context.Context, params CostCentresDeleteParams, opts ...RequestOption) (*OK, error)
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
func (n *CostCentresNamespace) List(ctx context.Context, params *CostCentresListParams, opts ...RequestOption) ([]CostCentre, error)
List: List cost centres
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-centres
func (*CostCentresNamespace) Update ¶ added in v0.29.0
func (n *CostCentresNamespace) Update(ctx context.Context, params CostCentresUpdateParams, opts ...RequestOption) (*CostCentre, error)
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
func (n *CostCentresRulesNamespace) Create(ctx context.Context, params CostCentresRulesCreateParams, opts ...RequestOption) (*AllocationRule, error)
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
func (n *CostCentresRulesNamespace) Delete(ctx context.Context, params CostCentresRulesDeleteParams, opts ...RequestOption) (*OK, error)
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
func (n *CostCentresRulesNamespace) List(ctx context.Context, params *CostCentresRulesListParams, opts ...RequestOption) ([]AllocationRule, error)
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
func (n *CostCentresRulesNamespace) Swap(ctx context.Context, params CostCentresRulesSwapParams, opts ...RequestOption) ([]AllocationRule, error)
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
func (n *CostCentresRulesNamespace) Update(ctx context.Context, params CostCentresRulesUpdateParams, opts ...RequestOption) (*AllocationRule, error)
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 CostChangeCadence ¶ added in v1.6.0
type CostChangeCadence = string
CostChangeCadence: Which window is compared to which, in complete UTC days (the accruing current day never counts). daily: one complete day vs the same weekday one week earlier. weekly: the last 7 complete days vs the 7 before them. monthly: month-to-date vs the same number of days at the start of the prior month — never MTD vs the full prior month.
const ( CostChangeCadenceDaily CostChangeCadence = "daily" CostChangeCadenceWeekly CostChangeCadence = "weekly" CostChangeCadenceMonthly CostChangeCadence = "monthly" )
The values CostChangeCadence takes.
type CostChangeDirection ¶ added in v1.6.0
type CostChangeDirection = string
CostChangeDirection is the `CostChangeDirection` schema.
const ( CostChangeDirectionIncrease CostChangeDirection = "increase" CostChangeDirectionDecrease CostChangeDirection = "decrease" CostChangeDirectionBoth CostChangeDirection = "both" )
The values CostChangeDirection takes.
type CostChargeType ¶ added in v1.6.0
type CostChargeType = string
CostChargeType is the `CostChargeType` schema.
const ( CostChargeTypeUsage CostChargeType = "usage" CostChargeTypeCommitmentFee CostChargeType = "commitment_fee" CostChargeTypeCommitmentDiscount CostChargeType = "commitment_discount" CostChargeTypeCredit CostChargeType = "credit" CostChargeTypeTax CostChargeType = "tax" CostChargeTypeRefund CostChargeType = "refund" CostChargeTypeAdjustment CostChargeType = "adjustment" CostChargeTypeSupport CostChargeType = "support" CostChargeTypeOther CostChargeType = "other" )
The values CostChargeType takes.
type CostDateRange ¶ added in v1.6.0
type CostDateRange = any
CostDateRange: A relative preset resolves against today every time the report runs, so a saved report keeps meaning 'the last 30 days'; an absolute range pins it to fixed dates.
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" CostDimensionChargeType CostDimension = "charge_type" CostDimensionCommitment CostDimension = "commitment" )
The values CostDimension takes.
type CostDimensionValues ¶
type CostDimensionValues struct {
Values []any `json:"values"`
}
CostDimensionValues is the `CostDimensionValues` schema.
type CostEstimate ¶ added in v0.43.0
type CostEstimate struct {
MonthlyAmount float64 `json:"monthlyAmount"`
Currency string `json:"currency"`
LineItems []CostEstimateLineItem `json:"lineItems"`
Partial *bool `json:"partial,omitempty"`
Notes []string `json:"notes,omitempty"`
}
CostEstimate is the `CostEstimate` schema.
The API may send null in its place.
type CostEstimateLineItem ¶ added in v0.43.0
type CostEstimateLineItem struct {
Label string `json:"label"`
MonthlyAmount float64 `json:"monthlyAmount"`
Detail *string `json:"detail,omitempty"`
Quantity *float64 `json:"quantity,omitempty"`
Unit *string `json:"unit,omitempty"`
}
CostEstimateLineItem is the `CostEstimateLineItem` schema.
type CostEstimateRequest ¶ added in v0.43.0
type CostEstimateRequest struct {
AccountID string `json:"accountId"`
ResourceTypeID string `json:"resourceTypeId"`
Fields map[string]string `json:"fields,omitempty"`
ResourceID *ResourceID `json:"resourceId,omitempty"`
PluginID *string `json:"pluginId,omitempty"`
ParentResourceID *ResourceID `json:"parentResourceId,omitempty"`
}
CostEstimateRequest is the `CostEstimateRequest` schema.
type CostExport ¶ added in v1.6.0
type CostExport struct {
ID string `json:"id"`
Name string `json:"name"`
// Format: One of "csv", "ndjson".
Format string `json:"format"`
Query CostExportQuery `json:"query"`
// Cadence: One of "daily", "weekly", "monthly".
Cadence string `json:"cadence"`
Hour int64 `json:"hour"`
Timezone string `json:"timezone"`
RestatementDays int64 `json:"restatementDays"`
Enabled bool `json:"enabled"`
Destination CostExportDestination `json:"destination"`
HasCredentials bool `json:"hasCredentials"`
// CredentialHint: Redacted marker, e.g. `AKIA…7F2Q`. No route ever returns
// the credential itself.
CredentialHint *string `json:"credentialHint"`
LastRunAt *string `json:"lastRunAt"`
// LastStatus: One of "pending", "succeeded", "failed".
LastStatus string `json:"lastStatus"`
// LastError: Why the last run failed, verbatim from the destination where
// possible.
LastError *string `json:"lastError"`
LastObjectCount *int64 `json:"lastObjectCount"`
LastRowCount *int64 `json:"lastRowCount"`
NextRunAt *string `json:"nextRunAt"`
CreatedByUserID *string `json:"createdByUserId"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
CostExport is the `CostExport` schema.
type CostExportDestination ¶ added in v1.6.0
type CostExportDestination = any
CostExportDestination is the `CostExportDestination` schema.
type CostExportFilter ¶ added in v1.6.0
type CostExportFilter struct {
// Dimension: One of "provider", "account", "service", "region", "resource",
// "tag", "charge_type", "commitment".
Dimension string `json:"dimension"`
// Op: One of "in", "not_in".
Op string `json:"op"`
Values []string `json:"values"`
TagKey *string `json:"tagKey,omitempty"`
}
CostExportFilter is the `CostExportFilter` schema.
type CostExportInput ¶ added in v1.6.0
type CostExportInput struct {
Name string `json:"name"`
// Format: One of "csv", "ndjson".
Format string `json:"format"`
Query CostExportQuery `json:"query"`
// Cadence: How often a run happens and — because a run writes one object per
// period — what a period is: a calendar day, an ISO week (Monday-start), or
// a calendar month.
//
// One of "daily", "weekly", "monthly".
Cadence string `json:"cadence"`
// Hour: Local hour in `timezone` a run fires at.
Hour int64 `json:"hour"`
// Timezone: IANA zone, e.g. `Europe/Berlin`. Validated against `Intl`.
Timezone string `json:"timezone"`
// RestatementDays: Trailing days of already-written periods each run
// re-exports. Providers restate spend for days after the fact, so the object
// written for yesterday is not final; every period overlapping this window
// is rebuilt in full at its existing key, which overwrites rather than
// duplicates. 0 disables it and is only correct for an org whose providers
// never revise.
RestatementDays int64 `json:"restatementDays"`
Enabled bool `json:"enabled"`
Destination CostExportDestination `json:"destination"`
// AccessKeyID: S3 only. Write-only; omit on update to keep the stored
// credential.
AccessKeyID *string `json:"accessKeyId,omitempty"`
// SecretAccessKey: S3 only. Write-only, never returned.
SecretAccessKey *string `json:"secretAccessKey,omitempty"`
// URL: HTTPS destinations only. Write-only, never returned — a signed URL
// carries its own signature, so it is treated as a bearer credential.
URL *string `json:"url,omitempty"`
}
CostExportInput is the `CostExportInput` schema.
type CostExportObject ¶ added in v1.6.0
type CostExportObject struct {
// PeriodStart: The period's first day, in the export's own timezone.
PeriodStart string `json:"periodStart"`
From string `json:"from"`
To string `json:"to"`
// Key: `{prefix}/cost-export/{exportId}/{cadence}/{periodStart}.{format}`.
// Deterministic, so re-exporting a restated period overwrites this object
// instead of adding a second copy.
Key string `json:"key"`
RowCount int64 `json:"rowCount"`
ByteCount int64 `json:"byteCount"`
}
CostExportObject is the `CostExportObject` schema.
type CostExportQuery ¶ added in v1.6.0
type CostExportQuery struct {
Version float64 `json:"version"`
// Dimensions: Row-identity columns kept in the output. Dropping one
// aggregates over it — an export grouped to provider + service is orders of
// magnitude smaller than a per-resource one.
Dimensions []string `json:"dimensions"`
// TagKeys: Tag keys emitted as their own `tag_<key>` columns.
TagKeys []string `json:"tagKeys"`
Filters []CostExportFilter `json:"filters"`
ChargeTypes []string `json:"chargeTypes,omitempty"`
// CostBasis: One of "cash", "amortized".
CostBasis *string `json:"costBasis,omitempty"`
}
CostExportQuery: The rows a run selects. Reuses the same `CostFilter` and dimension vocabulary the dashboards, budgets and cost reports store, so a filter means the same thing everywhere.
type CostExportRunResult ¶ added in v1.6.0
type CostExportRunResult struct {
ExportID string `json:"exportId"`
// Status: One of "pending", "succeeded", "failed".
Status string `json:"status"`
Objects []CostExportObject `json:"objects"`
RowCount int64 `json:"rowCount"`
// CollectionWatermark: The newest day every cost-reporting account in the
// org had data for when the run started. Stamped into every row as
// `collection_watermark`; rows dated after it are still arriving.
CollectionWatermark *string `json:"collectionWatermark"`
Error *string `json:"error"`
}
CostExportRunResult is the `CostExportRunResult` schema.
type CostExportsCreateParams ¶ added in v1.6.0
type CostExportsCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body CostExportInput
}
CostExportsCreateParams holds the parameters for `client.costExports.create`.
type CostExportsDeleteParams ¶ added in v1.6.0
type CostExportsDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostExportsDeleteParams holds the parameters for `client.costExports.delete`.
type CostExportsGetParams ¶ added in v1.6.0
type CostExportsGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostExportsGetParams holds the parameters for `client.costExports.get`.
type CostExportsListParams ¶ added in v1.6.0
type CostExportsListParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
CostExportsListParams holds the parameters for `client.costExports.list`.
Every field is optional; pass nil to take the defaults.
type CostExportsNamespace ¶ added in v1.6.0
type CostExportsNamespace struct {
// contains filtered or unexported fields
}
CostExportsNamespace is `client.costExports`.
func (*CostExportsNamespace) Create ¶ added in v1.6.0
func (n *CostExportsNamespace) Create(ctx context.Context, params CostExportsCreateParams, opts ...RequestOption) (*CostExport, error)
Create: Create a cost export
Credentials are required on create. They are encrypted at rest and no route ever returns them; responses carry a redacted `credentialHint` instead.
_Requires permission: `org:settings:write`._
POST /api/org/{orgId}/cost-exports
Raises on 400: Bad request
func (*CostExportsNamespace) Delete ¶ added in v1.6.0
func (n *CostExportsNamespace) Delete(ctx context.Context, params CostExportsDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Delete a cost export
Soft delete. Objects already written to the destination are left alone.
_Requires permission: `org:settings:write`._
DELETE /api/org/{orgId}/cost-exports/{id}
Raises on 404: Not found
func (*CostExportsNamespace) Get ¶ added in v1.6.0
func (n *CostExportsNamespace) Get(ctx context.Context, params CostExportsGetParams, opts ...RequestOption) (*CostExport, error)
Get: Get a cost export
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-exports/{id}
Raises on 404: Not found
func (*CostExportsNamespace) List ¶ added in v1.6.0
func (n *CostExportsNamespace) List(ctx context.Context, params *CostExportsListParams, opts ...RequestOption) ([]CostExport, error)
List: List scheduled cost exports
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-exports
func (*CostExportsNamespace) Run ¶ added in v1.6.0
func (n *CostExportsNamespace) Run(ctx context.Context, params CostExportsRunParams, opts ...RequestOption) (*CostExportRunResult, error)
Run: Run a cost export now
Runs the export immediately against the same code path the poller uses, writing every period in the restatement window. Answers 200 with `status: "failed"` and a message rather than an error status when the destination rejects the write — the caller wants the reason, and the same failure is recorded on the export.
_Requires permission: `org:settings:write`._
POST /api/org/{orgId}/cost-exports/{id}/run
Raises on 404: Not found
func (*CostExportsNamespace) Update ¶ added in v1.6.0
func (n *CostExportsNamespace) Update(ctx context.Context, params CostExportsUpdateParams, opts ...RequestOption) (*CostExport, error)
Update: Update a cost export
Replaces everything but the credential. Omit `accessKeyId`/`secretAccessKey`/`url` to keep the stored credential; changing the destination type requires supplying a new one. Saving reschedules the export from now.
_Requires permission: `org:settings:write`._
PUT /api/org/{orgId}/cost-exports/{id}
Raises on 400: Bad request
Raises on 404: Not found
type CostExportsRunParams ¶ added in v1.6.0
type CostExportsRunParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostExportsRunParams holds the parameters for `client.costExports.run`.
type CostExportsUpdateParams ¶ added in v1.6.0
type CostExportsUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
// Body: the JSON request body.
Body CostExportInput
}
CostExportsUpdateParams holds the parameters for `client.costExports.update`.
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 CostGraphConfig ¶ added in v1.6.0
type CostGraphConfig struct {
Version float64 `json:"version"`
// ChartType: One of "stacked_bar", "multi_bar", "line", "area", "pie".
ChartType string `json:"chartType"`
// Binning: One of "daily", "weekly", "monthly", "cumulative".
Binning string `json:"binning"`
DateRange CostDateRange `json:"dateRange"`
// GroupBy: One of "none", "provider", "account", "service", "region",
// "resource", "tag", "charge_type", "commitment".
GroupBy string `json:"groupBy"`
GroupByTagKey *string `json:"groupByTagKey,omitempty"`
Filters []CostReportFilter `json:"filters,omitempty"`
// SavedFilterID: A saved cost filter (see /saved-cost-filters) applied by
// reference and AND-composed with `filters` at query time, server-side.
// Editing the saved filter changes every graph, report and budget
// referencing it; a reference that fails to resolve makes the query error
// rather than silently run unfiltered.
SavedFilterID *string `json:"savedFilterId,omitempty"`
TopN *int64 `json:"topN,omitempty"`
ComparePreviousPeriod *bool `json:"comparePreviousPeriod,omitempty"`
ShowForecast *bool `json:"showForecast,omitempty"`
// CostBasis: One of "cash", "amortized".
CostBasis *string `json:"costBasis,omitempty"`
}
CostGraphConfig: The saved graph. Identical to the config an ad-hoc `cost_graph` dashboard widget stores inline — a report is that config given a name and an id.
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", "charge_type", "commitment".
GroupBy string `json:"groupBy"`
GroupByTagKey *string `json:"groupByTagKey,omitempty"`
Filters []CostFilter `json:"filters,omitempty"`
// Query: The same filter written as text, in the cost query language — an
// alternative to `filters`, compiled server-side into exactly that
// structure.
//
// Grammar: a conjunction of equality terms joined by `AND`. A term is
// `dimension = 'value'`, `dimension != 'value'`, `dimension IN ('a','b')` or
// `dimension NOT IN ('a','b')`; the tag dimension takes its key in brackets,
// `tag['owner'] = 'platform'`. Keywords are case-insensitive, strings may be
// single- or double-quoted, and a quote inside a value is escaped by
// doubling it (`'it”s'`) or with a backslash (`'it\'s'`).
//
// `OR` is deliberately not supported: the stored filter is a conjunction, so
// several values of one dimension go in an `IN` list and unrelated
// alternatives need separate queries. Anything the structured filter cannot
// express is a parse error rather than a second execution path.
//
// Sending both `query` and a non-empty `filters` is a 400, not a precedence
// rule. A parse failure is a 400 whose body carries `queryError` with the
// character `offset`, the `length` of the offending span, and the `expected`
// alternatives there.
Query *string `json:"query,omitempty"`
// SavedFilterID: A saved cost filter (see /saved-cost-filters) applied by
// reference. Resolved server-side at query time and AND-composed with
// whichever of `filters`/`query` is present — unlike those two it is a
// composition, not an alternative. An id that does not resolve to a live
// filter is a 400; the query is never silently run unfiltered.
SavedFilterID *string `json:"savedFilterId,omitempty"`
TopN *int64 `json:"topN,omitempty"`
ComparePreviousPeriod *bool `json:"comparePreviousPeriod,omitempty"`
Forecast *bool `json:"forecast,omitempty"`
CostBasis *CostBasis `json:"costBasis,omitempty"`
// ChargeTypes: Restrict to these kinds of charge. Omitted is all of them,
// which is what makes an unfiltered total net rather than gross — credits,
// refunds and commitment discounts are included. Rows collected before
// charge types existed, and rows from providers that cannot distinguish
// them, are `usage`.
ChargeTypes []CostChargeType `json:"chargeTypes,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 CostReport ¶ added in v1.6.0
type CostReport struct {
ID string `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
Config CostGraphConfig `json:"config"`
// FolderID: Folder the report is filed under (see /cost-report-folders);
// null is the top level of the Reports list. Moving a report is this same
// PUT with a different folderId; an id from another org is a 400. Deleting a
// folder never deletes its reports — they fall back to the top level.
FolderID *string `json:"folderId"`
CreatedByUserID *string `json:"createdByUserId"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
// Placements: The dashboards carrying a `cost_report` card for this report.
// Empty is normal — a report exists, and can be run, whether or not any
// dashboard shows it. Deleting the report removes these cards; removing a
// card leaves the report alone.
Placements []CostReportPlacement `json:"placements"`
}
CostReport is the `CostReport` schema.
type CostReportFilter ¶ added in v1.6.0
type CostReportFilter struct {
// Dimension: One of "provider", "account", "service", "region", "resource",
// "tag", "charge_type", "commitment".
Dimension string `json:"dimension"`
// Op: One of "in", "not_in".
Op string `json:"op"`
Values []string `json:"values"`
TagKey *string `json:"tagKey,omitempty"`
}
CostReportFilter is the `CostReportFilter` schema.
type CostReportFolder ¶ added in v1.6.0
type CostReportFolder struct {
ID string `json:"id"`
Name string `json:"name"`
// ParentFolderID: Parent folder for nesting; null is a top-level folder.
// Nesting is capped at 3 levels, and moving a folder inside itself or one of
// its own subfolders is rejected — both are 400s.
ParentFolderID *string `json:"parentFolderId"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
CostReportFolder is the `CostReportFolder` schema.
type CostReportFolderInput ¶ added in v1.6.0
type CostReportFolderInput struct {
Name string `json:"name"`
// ParentFolderID: Parent folder for nesting; null is a top-level folder.
// Nesting is capped at 3 levels, and moving a folder inside itself or one of
// its own subfolders is rejected — both are 400s.
ParentFolderID *string `json:"parentFolderId,omitempty"`
}
CostReportFolderInput is the `CostReportFolderInput` schema.
type CostReportFoldersCreateParams ¶ added in v1.6.0
type CostReportFoldersCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body CostReportFolderInput
}
CostReportFoldersCreateParams holds the parameters for `client.costReportFolders.create`.
type CostReportFoldersDeleteParams ¶ added in v1.6.0
type CostReportFoldersDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostReportFoldersDeleteParams holds the parameters for `client.costReportFolders.delete`.
type CostReportFoldersListParams ¶ added in v1.6.0
type CostReportFoldersListParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
CostReportFoldersListParams holds the parameters for `client.costReportFolders.list`.
Every field is optional; pass nil to take the defaults.
type CostReportFoldersNamespace ¶ added in v1.6.0
type CostReportFoldersNamespace struct {
// contains filtered or unexported fields
}
CostReportFoldersNamespace is `client.costReportFolders`.
func (*CostReportFoldersNamespace) Create ¶ added in v1.6.0
func (n *CostReportFoldersNamespace) Create(ctx context.Context, params CostReportFoldersCreateParams, opts ...RequestOption) (*CostReportFolder, error)
Create: Create a cost-report folder
_Requires permission: `costs:write`._
POST /api/org/{orgId}/cost-report-folders
Raises on 400: Bad request
func (*CostReportFoldersNamespace) Delete ¶ added in v1.6.0
func (n *CostReportFoldersNamespace) Delete(ctx context.Context, params CostReportFoldersDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Delete a cost-report folder
Never blocked by contents and never destructive to them: the folder's reports and immediate subfolders fall back to the top level. Deleting a folder cannot delete a report.
_Requires permission: `costs:write`._
DELETE /api/org/{orgId}/cost-report-folders/{id}
Raises on 404: Not found
func (*CostReportFoldersNamespace) List ¶ added in v1.6.0
func (n *CostReportFoldersNamespace) List(ctx context.Context, params *CostReportFoldersListParams, opts ...RequestOption) ([]CostReportFolder, error)
List: List cost-report folders
The org's report folders as a flat list — build the tree from `parentFolderId`. Folders organize the Reports list and nothing else; a report's id, URL and dashboard cards are unchanged by where it is filed.
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-report-folders
func (*CostReportFoldersNamespace) Update ¶ added in v1.6.0
func (n *CostReportFoldersNamespace) Update(ctx context.Context, params CostReportFoldersUpdateParams, opts ...RequestOption) (*CostReportFolder, error)
Update: Update a cost-report folder
Rename and/or reparent. Filing a *report* is not here — that is `PUT /cost-reports/{id}` with a different `folderId`. Reparenting past the 3-level depth limit, or under the folder's own subtree, is a 400.
_Requires permission: `costs:write`._
PUT /api/org/{orgId}/cost-report-folders/{id}
Raises on 400: Bad request
Raises on 404: Not found
type CostReportFoldersUpdateParams ¶ added in v1.6.0
type CostReportFoldersUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
// Body: the JSON request body.
Body CostReportFolderInput
}
CostReportFoldersUpdateParams holds the parameters for `client.costReportFolders.update`.
type CostReportInput ¶ added in v1.6.0
type CostReportInput struct {
Name string `json:"name"`
Description *string `json:"description,omitempty"`
Config CostGraphConfig `json:"config"`
// FolderID: Folder the report is filed under (see /cost-report-folders);
// null is the top level of the Reports list. Moving a report is this same
// PUT with a different folderId; an id from another org is a 400. Deleting a
// folder never deletes its reports — they fall back to the top level.
FolderID *string `json:"folderId,omitempty"`
}
CostReportInput is the `CostReportInput` schema.
type CostReportNotificationsListParams ¶ added in v1.6.0
type CostReportNotificationsListParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
CostReportNotificationsListParams holds the parameters for `client.costReportNotifications.list`.
Every field is optional; pass nil to take the defaults.
type CostReportNotificationsNamespace ¶ added in v1.6.0
type CostReportNotificationsNamespace struct {
// contains filtered or unexported fields
}
CostReportNotificationsNamespace is `client.costReportNotifications`.
func (*CostReportNotificationsNamespace) List ¶ added in v1.6.0
func (n *CostReportNotificationsNamespace) List(ctx context.Context, params *CostReportNotificationsListParams, opts ...RequestOption) ([]ReportNotification, error)
List: List every delivery schedule in the organization
All reports' schedules in one call — what the CLI's schedules column reads. Schedules of deleted reports are excluded.
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-report-notifications
type CostReportPlacement ¶ added in v1.6.0
type CostReportPlacement struct {
WidgetID string `json:"widgetId"`
DashboardID string `json:"dashboardId"`
DashboardName string `json:"dashboardName"`
}
CostReportPlacement is the `CostReportPlacement` schema.
type CostReportRunResult ¶ added in v1.6.0
type CostReportRunResult struct {
ReportID string `json:"reportId"`
Name string `json:"name"`
From string `json:"from"`
To string `json:"to"`
Result CostQueryResponse `json:"result"`
}
CostReportRunResult is the `CostReportRunResult` schema.
type CostReportsCreateParams ¶ added in v1.6.0
type CostReportsCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body CostReportInput
}
CostReportsCreateParams holds the parameters for `client.costReports.create`.
type CostReportsDeleteParams ¶ added in v1.6.0
type CostReportsDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostReportsDeleteParams holds the parameters for `client.costReports.delete`.
type CostReportsGetParams ¶ added in v1.6.0
type CostReportsGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostReportsGetParams holds the parameters for `client.costReports.get`.
type CostReportsListParams ¶ added in v1.6.0
type CostReportsListParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
CostReportsListParams holds the parameters for `client.costReports.list`.
Every field is optional; pass nil to take the defaults.
type CostReportsNamespace ¶ added in v1.6.0
type CostReportsNamespace struct {
// Notifications: `client.costReports.notifications`.
Notifications *CostReportsNotificationsNamespace
// contains filtered or unexported fields
}
CostReportsNamespace is `client.costReports`.
func (*CostReportsNamespace) Create ¶ added in v1.6.0
func (n *CostReportsNamespace) Create(ctx context.Context, params CostReportsCreateParams, opts ...RequestOption) (*CostReport, error)
Create: Create a cost report
_Requires permission: `costs:write`._
POST /api/org/{orgId}/cost-reports
Raises on 400: Bad request
func (*CostReportsNamespace) Delete ¶ added in v1.6.0
func (n *CostReportsNamespace) Delete(ctx context.Context, params CostReportsDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Delete a cost report
Soft delete. Every dashboard card pointing at the report is removed with it — a card whose report is gone could only ever render as an unavailable tile.
_Requires permission: `costs:write`._
DELETE /api/org/{orgId}/cost-reports/{id}
Raises on 404: Not found
func (*CostReportsNamespace) Get ¶ added in v1.6.0
func (n *CostReportsNamespace) Get(ctx context.Context, params CostReportsGetParams, opts ...RequestOption) (*CostReport, error)
Get: Get a cost report
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-reports/{id}
Raises on 404: Not found
func (*CostReportsNamespace) List ¶ added in v1.6.0
func (n *CostReportsNamespace) List(ctx context.Context, params *CostReportsListParams, opts ...RequestOption) ([]CostReport, error)
List: List saved cost reports
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-reports
func (*CostReportsNamespace) Run ¶ added in v1.6.0
func (n *CostReportsNamespace) Run(ctx context.Context, params CostReportsRunParams, opts ...RequestOption) (*CostReportRunResult, error)
Run: Run a cost report
Executes the report's saved config and returns the series, along with the inclusive window a relative preset resolved to. Takes no body: the report *is* the query, so a caller never has to reassemble its config to get the numbers.
_Requires permission: `costs:read`._
POST /api/org/{orgId}/cost-reports/{id}/run
Raises on 400: Bad request
Raises on 404: Not found
func (*CostReportsNamespace) Update ¶ added in v1.6.0
func (n *CostReportsNamespace) Update(ctx context.Context, params CostReportsUpdateParams, opts ...RequestOption) (*CostReport, error)
Update: Update a cost report
Replaces the report's name, description, config and folder. Every dashboard showing the report picks up the new config — that is what referencing a report by id buys.
_Requires permission: `costs:write`._
PUT /api/org/{orgId}/cost-reports/{id}
Raises on 400: Bad request
Raises on 404: Not found
type CostReportsNotificationsCreateParams ¶ added in v1.6.0
type CostReportsNotificationsCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
// Body: the JSON request body.
Body ReportNotificationInput
}
CostReportsNotificationsCreateParams holds the parameters for `client.costReports.notifications.create`.
type CostReportsNotificationsDeleteParams ¶ added in v1.6.0
type CostReportsNotificationsDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
NotificationID string
}
CostReportsNotificationsDeleteParams holds the parameters for `client.costReports.notifications.delete`.
type CostReportsNotificationsListParams ¶ added in v1.6.0
type CostReportsNotificationsListParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostReportsNotificationsListParams holds the parameters for `client.costReports.notifications.list`.
type CostReportsNotificationsNamespace ¶ added in v1.6.0
type CostReportsNotificationsNamespace struct {
// contains filtered or unexported fields
}
CostReportsNotificationsNamespace is `client.costReports.notifications`.
func (*CostReportsNotificationsNamespace) Create ¶ added in v1.6.0
func (n *CostReportsNotificationsNamespace) Create(ctx context.Context, params CostReportsNotificationsCreateParams, opts ...RequestOption) (*ReportNotification, error)
Create: Create a delivery schedule
On its cadence the server runs the report and sends a composed text summary — period total (converted to the org's display currency where configured, with the conversion caveat), change vs the previous period, top groups, and a deep link. No chart images. An empty result still sends, saying so.
_Requires permission: `org:settings:write`._
POST /api/org/{orgId}/cost-reports/{id}/notifications
Raises on 400: Bad request
Raises on 404: Not found
func (*CostReportsNotificationsNamespace) Delete ¶ added in v1.6.0
func (n *CostReportsNotificationsNamespace) Delete(ctx context.Context, params CostReportsNotificationsDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Delete a delivery schedule
_Requires permission: `org:settings:write`._
DELETE /api/org/{orgId}/cost-reports/{id}/notifications/{notificationId}
Raises on 404: Not found
func (*CostReportsNotificationsNamespace) List ¶ added in v1.6.0
func (n *CostReportsNotificationsNamespace) List(ctx context.Context, params CostReportsNotificationsListParams, opts ...RequestOption) ([]ReportNotification, error)
List: List a report's delivery schedules
_Requires permission: `costs:read`._
GET /api/org/{orgId}/cost-reports/{id}/notifications
Raises on 404: Not found
func (*CostReportsNotificationsNamespace) Send ¶ added in v1.6.0
func (n *CostReportsNotificationsNamespace) Send(ctx context.Context, params CostReportsNotificationsSendParams, opts ...RequestOption) (*ReportNotificationSendResult, error)
Send: Send a schedule's report now
Runs the report and delivers it to this schedule's destinations immediately, ignoring the schedule and its enabled flag. Fails with a 400 naming the reason when nothing could be delivered. A successful manual send clears a parked failure — it is the documented recovery for a partial delivery.
_Requires permission: `org:settings:write`._
POST /api/org/{orgId}/cost-reports/{id}/notifications/{notificationId}/send
Raises on 400: Bad request
Raises on 404: Not found
func (*CostReportsNotificationsNamespace) Targets ¶ added in v1.6.0
func (n *CostReportsNotificationsNamespace) Targets(ctx context.Context, params CostReportsNotificationsTargetsParams, opts ...RequestOption) (*ReportDeliveryTargets, error)
Targets: List the destinations a schedule can deliver to
The org's live Slack channels and Teams webhooks, and whether this deployment can send mail. Destinations are picked from here — a schedule can only point at surfaces the org already connected.
_Requires permission: `org:settings:write`._
GET /api/org/{orgId}/cost-reports/{id}/notifications/targets
func (*CostReportsNotificationsNamespace) Update ¶ added in v1.6.0
func (n *CostReportsNotificationsNamespace) Update(ctx context.Context, params CostReportsNotificationsUpdateParams, opts ...RequestOption) (*ReportNotification, error)
Update: Update a delivery schedule
_Requires permission: `org:settings:write`._
PUT /api/org/{orgId}/cost-reports/{id}/notifications/{notificationId}
Raises on 400: Bad request
Raises on 404: Not found
type CostReportsNotificationsSendParams ¶ added in v1.6.0
type CostReportsNotificationsSendParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
NotificationID string
}
CostReportsNotificationsSendParams holds the parameters for `client.costReports.notifications.send`.
type CostReportsNotificationsTargetsParams ¶ added in v1.6.0
type CostReportsNotificationsTargetsParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostReportsNotificationsTargetsParams holds the parameters for `client.costReports.notifications.targets`.
type CostReportsNotificationsUpdateParams ¶ added in v1.6.0
type CostReportsNotificationsUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
NotificationID string
// Body: the JSON request body.
Body ReportNotificationInput
}
CostReportsNotificationsUpdateParams holds the parameters for `client.costReports.notifications.update`.
type CostReportsRunParams ¶ added in v1.6.0
type CostReportsRunParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
CostReportsRunParams holds the parameters for `client.costReports.run`.
type CostReportsUpdateParams ¶ added in v1.6.0
type CostReportsUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
// Body: the JSON request body.
Body CostReportInput
}
CostReportsUpdateParams holds the parameters for `client.costReports.update`.
type CostSeriesPoint ¶
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
func (n *CostsAnomalySettingsNamespace) Get(ctx context.Context, params *CostsAnomalySettingsGetParams, opts ...RequestOption) (*CostAnomalySettingsView, error)
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
func (n *CostsAnomalySettingsNamespace) Update(ctx context.Context, params CostsAnomalySettingsUpdateParams, opts ...RequestOption) (*CostAnomalySettingsView, error)
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", "charge_type", "commitment", "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
func (n *CostsNamespace) Anomalies(ctx context.Context, params *CostsAnomaliesParams, opts ...RequestOption) (*CostsAnomaliesResponse, error)
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 ¶
func (n *CostsNamespace) Dimensions(ctx context.Context, params CostsDimensionsParams, opts ...RequestOption) (*CostDimensionValues, error)
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. `charge_type` answers from the fixed set of charge types rather than from the stored data, so the picker is populated before any provider has reported one.
_Requires permission: `costs:read`._
GET /api/org/{orgId}/costs/dimensions
Raises on 400: Bad request
func (*CostsNamespace) Query ¶
func (n *CostsNamespace) Query(ctx context.Context, params CostsQueryParams, opts ...RequestOption) (*CostQueryResponse, error)
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.
`costBasis` chooses between cash and amortized money, and `chargeTypes` narrows which kinds of charge count. Both the comparison period and the forecast are computed on the same basis and charge types as the series itself.
The filter can be sent structurally as `filters` or as text in the cost query language via `query` (`provider = 'aws' AND tag['env'] != 'dev'`). They are two spellings of one filter: sending both is a 400, and a query that does not parse is a 400 carrying the offset of the mistake.
_Requires permission: `costs:read`._
POST /api/org/{orgId}/costs/query
Raises on 400: Bad request
func (*CostsNamespace) Rows ¶ added in v0.6.0
func (n *CostsNamespace) Rows(ctx context.Context, params CostsRowsParams, opts ...RequestOption) (*CostPushResponse, error)
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 ¶
func (n *CostsNamespace) Status(ctx context.Context, params *CostsStatusParams, opts ...RequestOption) (*CostsStatusResponse, error)
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
func (n *CostsNamespace) Untagged(ctx context.Context, params *CostsUntaggedParams, opts ...RequestOption) (*UntaggedSpendReport, error)
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
// Basis: Which money to sum. `cash` (the default) is what the provider
// charged on the day it charged it; `amortized` spreads a commitment's
// up-front fee across the term it buys. Providers that report no amortized
// amount fall back to their cash amount.
//
// One of "cash", "amortized".
Basis *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
// Basis: Which money to sum. `cash` (the default) is what the provider
// charged on the day it charged it; `amortized` spreads a commitment's
// up-front fee across the term it buys. Providers that report no amortized
// amount fall back to their cash amount.
//
// One of "cash", "amortized".
Basis *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,omitempty"`
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 CreateJiraIssueInput ¶ added in v1.6.0
type CreateJiraIssueInput struct {
SourceKind JiraSourceKind `json:"sourceKind"`
// SourceID: The finding's own id, as the detector reports it.
SourceID string `json:"sourceId"`
ProjectKey string `json:"projectKey"`
IssueTypeID string `json:"issueTypeId"`
Summary string `json:"summary"`
// Description: Plain text. Converted server-side to Atlassian Document
// Format, which is what the Jira REST v3 description field requires; blank
// lines become paragraphs.
Description *string `json:"description,omitempty"`
// Labels: Whitespace inside a label is replaced with '-', since Jira rejects
// it.
Labels []string `json:"labels,omitempty"`
}
CreateJiraIssueInput is the `CreateJiraIssueInput` schema.
type CreateJiraIssueResult ¶ added in v1.6.0
type CreateJiraIssueResult struct {
Issue CreateJiraIssueResultIssue `json:"issue"`
Link JiraIssueLink `json:"link"`
}
CreateJiraIssueResult is the `CreateJiraIssueResult` schema.
type CreateJiraIssueResultIssue ¶ added in v1.6.0
type CreateJiraIssueResultIssue struct {
ID string `json:"id"`
Key string `json:"key"`
URL string `json:"url"`
}
CreateJiraIssueResultIssue is an object the spec declares inline.
type CreateLinearIssueInput ¶ added in v1.6.0
type CreateLinearIssueInput struct {
SourceKind LinearSourceKind `json:"sourceKind"`
// SourceID: The finding's own id, as the detector reports it.
SourceID string `json:"sourceId"`
// TeamID: Team to file into. Every Linear issue belongs to exactly one team.
TeamID string `json:"teamId"`
Title string `json:"title"`
// Description: Markdown, passed to Linear as-is — unlike Jira, where the
// server converts plain text to Atlassian Document Format.
Description *string `json:"description,omitempty"`
// LabelIDs: Ids of existing labels in the workspace. Linear cannot create
// labels here.
LabelIDs []string `json:"labelIds,omitempty"`
// ProjectID: Optional project to attach the issue to.
ProjectID *string `json:"projectId,omitempty"`
}
CreateLinearIssueInput is the `CreateLinearIssueInput` schema.
type CreateLinearIssueResult ¶ added in v1.6.0
type CreateLinearIssueResult struct {
Issue CreateLinearIssueResultIssue `json:"issue"`
Link LinearIssueLink `json:"link"`
}
CreateLinearIssueResult is the `CreateLinearIssueResult` schema.
type CreateLinearIssueResultIssue ¶ added in v1.6.0
type CreateLinearIssueResultIssue struct {
ID string `json:"id"`
Identifier string `json:"identifier"`
URL string `json:"url"`
}
CreateLinearIssueResultIssue is an object the spec declares inline.
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 ¶
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 CredentialHygieneGetParams ¶ added in v0.43.0
type CredentialHygieneGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// WindowDays: Activity window. Defaults to 90.
WindowDays *int64
}
CredentialHygieneGetParams holds the parameters for `client.credentialHygiene.get`.
Every field is optional; pass nil to take the defaults.
type CredentialHygieneNamespace ¶ added in v0.43.0
type CredentialHygieneNamespace struct {
// contains filtered or unexported fields
}
CredentialHygieneNamespace is `client.credentialHygiene`.
func (*CredentialHygieneNamespace) Get ¶ added in v0.43.0
func (n *CredentialHygieneNamespace) Get(ctx context.Context, params *CredentialHygieneGetParams, opts ...RequestOption) (*HygieneReport, error)
Get: Credential hygiene report
API keys nobody uses, SSH keys nothing references, and members holding write permissions they have never exercised — derived entirely from data the server already holds. No provider call and nothing to enable.
**The audit log only witnesses writes.** Reading a resource list or a cost graph leaves no audit row by design, so this report draws no conclusion about read permissions: an absence of evidence about them proves nothing. `permissionFindingsWithheld` is set when the organization does not yet have enough audit history for the unused-permission finding to be meaningful. Both are load-bearing — a governance report that overclaims is worse than none.
Gated on `audit:read` rather than a permission of its own: every fact here is already reachable by anyone who can read the audit log, so this is a lens rather than a new disclosure.
_Requires permission: `audit:read`._
GET /api/org/{orgId}/credential-hygiene
Raises on 400: Bad request
type CreditBurndown ¶ added in v0.43.0
type CreditBurndown struct {
Pots []CreditPot `json:"pots"`
Failures []CreditPollFailure `json:"failures"`
// PendingAccountIDs: Credit-capable accounts never yet collected — named
// rather than omitted.
PendingAccountIDs []string `json:"pendingAccountIds"`
BurnWindowDays int64 `json:"burnWindowDays"`
}
CreditBurndown is the `CreditBurndown` schema.
type CreditPollFailure ¶ added in v0.43.0
type CreditPollFailure struct {
AccountID string `json:"accountId"`
AccountName string `json:"accountName"`
PluginID PluginID `json:"pluginId"`
Error string `json:"error"`
HelpLabel *string `json:"helpLabel"`
// HelpURL: Set when the plugin reported a permission gap rather than an
// outage.
HelpURL *string `json:"helpUrl"`
FailureCount int64 `json:"failureCount"`
}
CreditPollFailure is the `CreditPollFailure` schema.
type CreditPot ¶ added in v0.43.0
type CreditPot struct {
AccountID string `json:"accountId"`
AccountName string `json:"accountName"`
PluginID PluginID `json:"pluginId"`
// CapabilityLabel: The provider's own word for this pot — "Credits",
// "Balance".
CapabilityLabel string `json:"capabilityLabel"`
TopUpURL *string `json:"topUpUrl"`
// PotKey: Stable identity for this pot within the account — a currency code,
// a project id — so successive readings line up into a series.
PotKey string `json:"potKey"`
Label string `json:"label"`
Remaining float64 `json:"remaining"`
Currency string `json:"currency"`
// Granted: What was granted, when the provider reports it.
Granted *float64 `json:"granted"`
// CreditExpiresAt: Hard expiry on the credit itself, independent of burn.
CreditExpiresAt *string `json:"creditExpiresAt"`
ObservedAt string `json:"observedAt"`
// BurnPerDay: Spend per day over the observed span. **Null means there is
// not enough history to say** — never 0, which would read as 'nothing is
// being spent'.
BurnPerDay *float64 `json:"burnPerDay"`
BurnSpanDays float64 `json:"burnSpanDays"`
Observations int64 `json:"observations"`
// TopUps: Increases seen between consecutive readings. A top-up is recorded,
// never netted off the burn — subtracting the endpoints of a window
// containing one reports a negative burn and an infinite runway.
TopUps int64 `json:"topUps"`
RunwayDays *float64 `json:"runwayDays"`
ExhaustedAt *string `json:"exhaustedAt"`
// NeverEmpties: Nothing has been spent over the observed span.
NeverEmpties bool `json:"neverEmpties"`
// LimitedByExpiry: The credit's own expiry, not the burn rate, is the
// binding deadline.
LimitedByExpiry bool `json:"limitedByExpiry"`
// Urgency: One of "critical", "warning", "ok", "unknown".
Urgency string `json:"urgency"`
}
CreditPot is the `CreditPot` schema.
type CreditsGetParams ¶ added in v0.43.0
type CreditsGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
CreditsGetParams holds the parameters for `client.credits.get`.
Every field is optional; pass nil to take the defaults.
type CreditsNamespace ¶ added in v0.43.0
type CreditsNamespace struct {
// contains filtered or unexported fields
}
CreditsNamespace is `client.credits`.
func (*CreditsNamespace) Get ¶ added in v0.43.0
func (n *CreditsNamespace) Get(ctx context.Context, params *CreditsGetParams, opts ...RequestOption) (*CreditBurndown, error)
Get: Prepaid credit balances, burn rate and runway
Every prepaid pot the organization holds, most urgent first. A provider that bills in arrears sends an invoice you can argue with; a prepaid pot that empties simply stops answering — so this is an availability number as much as a finance one.
The burn rate is measured from the server's own series of readings rather than reported by the provider, and it is the sum of the **decreases** between consecutive readings: a top-up inside the window is recorded separately, never netted off. The runway is bounded by both the burn and the credit's own expiry, whichever comes first.
Only providers that expose a balance appear here; most bill in arrears and have no pot.
_Requires permission: `costs:read`._
GET /api/org/{orgId}/credits
type CurrencyConfig ¶ added in v1.6.0
type CurrencyConfig struct {
// DisplayCurrency: ISO 4217 code, upper-case.
DisplayCurrency *string `json:"displayCurrency"`
Rates []ExchangeRate `json:"rates"`
}
CurrencyConfig is the `CurrencyConfig` schema.
type CurrencyGetParams ¶ added in v1.6.0
type CurrencyGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
CurrencyGetParams holds the parameters for `client.currency.get`.
Every field is optional; pass nil to take the defaults.
type CurrencyNamespace ¶ added in v1.6.0
type CurrencyNamespace struct {
// Rates: `client.currency.rates`.
Rates *CurrencyRatesNamespace
// contains filtered or unexported fields
}
CurrencyNamespace is `client.currency`.
func (*CurrencyNamespace) Get ¶ added in v1.6.0
func (n *CurrencyNamespace) Get(ctx context.Context, params *CurrencyGetParams, opts ...RequestOption) (*CurrencyConfig, error)
Get: The org's display currency and exchange rate table
Readable with `costs:read` rather than a settings permission: anyone who can see a converted total has to be able to see what it was converted at, or the number is unauditable.
_Requires permission: `costs:read`._
GET /api/org/{orgId}/currency
func (*CurrencyNamespace) Update ¶ added in v1.6.0
func (n *CurrencyNamespace) Update(ctx context.Context, params CurrencyUpdateParams, opts ...RequestOption) (*CurrencySettings, error)
Update: Set or clear the org's display currency
Setting a currency opts the organization into converted totals; `null` turns conversion off everywhere and restores the per-currency view. Clearing does not delete the rate table, so conversion can be turned back on without re-stating anything. Only currencies with a configured rate are converted — Infrawrench never fetches live exchange rates.
_Requires permission: `org:settings:write`._
PUT /api/org/{orgId}/currency
Raises on 400: Bad request
type CurrencyRatesDeleteParams ¶ added in v1.6.0
type CurrencyRatesDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
RateID string
}
CurrencyRatesDeleteParams holds the parameters for `client.currency.rates.delete`.
type CurrencyRatesDeleteResponse ¶ added in v1.6.0
type CurrencyRatesDeleteResponse struct {
OK bool `json:"ok"`
}
CurrencyRatesDeleteResponse is an object the spec declares inline.
type CurrencyRatesNamespace ¶ added in v1.6.0
type CurrencyRatesNamespace struct {
// contains filtered or unexported fields
}
CurrencyRatesNamespace is `client.currency.rates`.
func (*CurrencyRatesNamespace) Delete ¶ added in v1.6.0
func (n *CurrencyRatesNamespace) Delete(ctx context.Context, params CurrencyRatesDeleteParams, opts ...RequestOption) (*CurrencyRatesDeleteResponse, error)
Delete: Delete one exchange rate
Removing a rate makes the days it covered fall back to the next-older rate, or to unconverted if none remains. Spend never disappears — it reverts to its own currency.
_Requires permission: `org:settings:write`._
DELETE /api/org/{orgId}/currency/rates/{rateId}
Raises on 404: Not found
func (*CurrencyRatesNamespace) Update ¶ added in v1.6.0
func (n *CurrencyRatesNamespace) Update(ctx context.Context, params CurrencyRatesUpdateParams, opts ...RequestOption) (*ExchangeRate, error)
Update: Create or replace one exchange rate
Upserts on (`fromCurrency`, `toCurrency`, `effectiveFrom`) — one rate per pair per day, so correcting a rate replaces it rather than adding a second one whose precedence a reader would have to guess. Rates are stated to the display currency in one hop: nothing inverts a rate or chains two, because both produce a number you never stated.
_Requires permission: `org:settings:write`._
PUT /api/org/{orgId}/currency/rates
Raises on 400: Bad request
type CurrencyRatesUpdateParams ¶ added in v1.6.0
type CurrencyRatesUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body ExchangeRateInput
}
CurrencyRatesUpdateParams holds the parameters for `client.currency.rates.update`.
type CurrencySettings ¶ added in v1.6.0
type CurrencySettings struct {
// DisplayCurrency: The currency converted amounts are expressed in, or
// `null` for no conversion at all. `null` is the default and the state of
// every organization that has not opted in: cost data is stored per currency
// and never merged unless you ask.
DisplayCurrency *string `json:"displayCurrency"`
}
CurrencySettings is the `CurrencySettings` schema.
type CurrencyUpdateParams ¶ added in v1.6.0
type CurrencyUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body CurrencySettings
}
CurrencyUpdateParams holds the parameters for `client.currency.update`.
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
func (n *CustomGraphsNamespace) Check(ctx context.Context, params CustomGraphsCheckParams, opts ...RequestOption) (*CustomGraphCheckResult, error)
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
func (n *CustomGraphsNamespace) Create(ctx context.Context, params CustomGraphsCreateParams, opts ...RequestOption) (*CustomGraphFull, error)
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
func (n *CustomGraphsNamespace) Delete(ctx context.Context, params CustomGraphsDeleteParams, opts ...RequestOption) (*OK, error)
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
func (n *CustomGraphsNamespace) Get(ctx context.Context, params CustomGraphsGetParams, opts ...RequestOption) (*CustomGraphFull, error)
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
func (n *CustomGraphsNamespace) List(ctx context.Context, params *CustomGraphsListParams, opts ...RequestOption) ([]CustomGraphSummary, error)
List: List custom graphs
_Requires permission: `dashboards:read`._
GET /api/org/{orgId}/custom-graphs
func (*CustomGraphsNamespace) Render ¶ added in v0.16.0
func (n *CustomGraphsNamespace) Render(ctx context.Context, params CustomGraphsRenderParams, opts ...RequestOption) (*CustomGraphRenderResult, error)
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
func (n *CustomGraphsNamespace) Typings(ctx context.Context, params *CustomGraphsTypingsParams, opts ...RequestOption) (io.ReadCloser, error)
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
func (n *CustomGraphsNamespace) Update(ctx context.Context, params CustomGraphsUpdateParams, opts ...RequestOption) (*CustomGraphFull, error)
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 DNSGetParams ¶ added in v0.43.0
type DNSGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
DNSGetParams holds the parameters for `client.dns.get`.
Every field is optional; pass nil to take the defaults.
type DNSInventoryCounts ¶ added in v0.43.0
type DNSInventoryCounts struct {
Zones int64 `json:"zones"`
Records int64 `json:"records"`
Owned int64 `json:"owned"`
Dangling int64 `json:"dangling"`
External int64 `json:"external"`
NotAnalysed int64 `json:"notAnalysed"`
}
DNSInventoryCounts: Record counts per status; zones counted separately.
Spec schema: `DnsInventoryCounts`.
type DNSInventoryResponse ¶ added in v0.43.0
type DNSInventoryResponse struct {
// Zones: Sorted by domain, then account name.
Zones []DNSZone `json:"zones"`
// Records: Sorted worst status first, then by name.
Records []DNSRecord `json:"records"`
Counts DNSInventoryCounts `json:"counts"`
// SkippedNamespaces: Provider namespaces that were declared but not
// evaluated, and why — either no account for the plugin is connected, or no
// claimant resource has synced. Both are missing data rather than a clean
// bill of health, so they are reported rather than hidden.
SkippedNamespaces []DNSSkippedNamespace `json:"skippedNamespaces"`
GeneratedAt string `json:"generatedAt"`
}
DNSInventoryResponse is the `DnsInventoryResponse` schema.
Spec schema: `DnsInventoryResponse`.
type DNSNamespace ¶ added in v0.43.0
type DNSNamespace struct {
// contains filtered or unexported fields
}
DNSNamespace is `client.dns`.
func (*DNSNamespace) Get ¶ added in v0.43.0
func (n *DNSNamespace) Get(ctx context.Context, params *DNSGetParams, opts ...RequestOption) (*DNSInventoryResponse, error)
Get: List every DNS zone and record, with dangling targets flagged
One view over every zone and record across the connected DNS providers (Cloudflare, Route 53, Cloud DNS, DigitalOcean, Netlify, Azure DNS, Vercel), with each record target classified against the rest of the workspace. No provider API calls are made and no DNS is resolved — results reflect the last sync.
A `dangling` target is a subdomain-takeover candidate: the record points into a provider namespace this workspace manages and nothing synced claims it. The same records surface as `dns-dangling-target` findings on `GET /posture` and alert through the posture channel, so there is no separate DNS alert setting.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/dns
type DNSRecord ¶ added in v0.43.0
type DNSRecord struct {
// ResourceID: Infrawrench resource id of the record itself.
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"`
// ZoneResourceID: Owning zone's resource id, or null when the record could
// not be attributed.
ZoneResourceID *string `json:"zoneResourceId"`
ZoneDomain *string `json:"zoneDomain"`
// Name: Fully qualified, lowercased, no trailing dot.
Name string `json:"name"`
Type string `json:"type"`
TTL *float64 `json:"ttl"`
Priority *float64 `json:"priority"`
// Proxied: Whether the provider proxies the record (Cloudflare's orange
// cloud).
Proxied bool `json:"proxied"`
Targets []DNSRecordTarget `json:"targets"`
// Status: Worst classification across `targets`.
//
// One of "owned", "dangling", "external", "not-analysed".
Status string `json:"status"`
}
DNSRecord is the `DnsRecord` schema.
Spec schema: `DnsRecord`.
type DNSRecordTarget ¶ added in v0.43.0
type DNSRecordTarget struct {
// Value: The target as stored, lowercased with any trailing dot removed.
Value string `json:"value"`
// Classification: What can be said about a record target from synced state
// alone. `owned` — the value is an identity of a synced resource. `dangling`
// — the value falls inside a provider namespace this workspace manages (an
// S3 endpoint, a `*.vercel.app` alias) and no synced resource claims it,
// which is the subdomain-takeover signature. `external` — the value points
// somewhere there is no declaration for; not a finding. `not-analysed` — the
// record type carries no host target that is reasoned about (TXT, MX, SOA,
// CAA, SRV).
//
// One of "owned", "dangling", "external", "not-analysed".
Classification string `json:"classification"`
Resource *DNSTargetResource `json:"resource"`
Service *DNSTargetService `json:"service"`
}
DNSRecordTarget is the `DnsRecordTarget` schema.
Spec schema: `DnsRecordTarget`.
type DNSSkippedNamespace ¶ added in v0.43.0
type DNSSkippedNamespace struct {
PluginID PluginID `json:"pluginId"`
PluginName string `json:"pluginName"`
Label string `json:"label"`
Reason string `json:"reason"`
}
DNSSkippedNamespace is the `DnsSkippedNamespace` schema.
Spec schema: `DnsSkippedNamespace`.
type DNSTargetResource ¶ added in v0.43.0
type DNSTargetResource struct {
ResourceID string `json:"resourceId"`
DisplayName string `json:"displayName"`
PluginID PluginID `json:"pluginId"`
ResourceTypeID string `json:"resourceTypeId"`
ResourceTypeName string `json:"resourceTypeName"`
AccountID string `json:"accountId"`
}
DNSTargetResource: Set only when classification is "owned".
Spec schema: `DnsTargetResource`.
The API may send null in its place.
type DNSTargetService ¶ added in v0.43.0
type DNSTargetService struct {
PluginID PluginID `json:"pluginId"`
PluginName string `json:"pluginName"`
ResourceTypeID string `json:"resourceTypeId"`
RuleID string `json:"ruleId"`
Label string `json:"label"`
// Severity: One of "critical", "high", "medium", "low".
Severity string `json:"severity"`
// Reason: Plugin-authored note on what claiming the name gets an attacker.
Reason string `json:"reason"`
// ClaimLabel: The instance-identifying part of the hostname, e.g. the bucket
// or app name.
ClaimLabel string `json:"claimLabel"`
}
DNSTargetService: Set only when classification is "dangling".
Spec schema: `DnsTargetService`.
The API may send null in its place.
type DNSZone ¶ added in v0.43.0
type DNSZone struct {
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"`
Domain string `json:"domain"`
Status *string `json:"status"`
// IsPrivate: Split-horizon/internal zone; listed but never analysed for
// takeover.
IsPrivate bool `json:"isPrivate"`
// RecordCount: Records synced into this zone.
RecordCount int64 `json:"recordCount"`
// ProviderRecordCount: The provider's own record count, when reported. May
// exceed `recordCount` — several plugins list zones without listing their
// records.
ProviderRecordCount *int64 `json:"providerRecordCount"`
DanglingCount int64 `json:"danglingCount"`
}
DNSZone is the `DnsZone` schema.
Spec schema: `DnsZone`.
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: `cost_graph` stores its whole config inline — a one-off card. `cost_report` points at a saved cost report by id, so editing the report updates every dashboard showing it.
const ( DashboardWidgetKindCostGraph DashboardWidgetKind = "cost_graph" DashboardWidgetKindCostReport DashboardWidgetKind = "cost_report" 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 ¶
func (n *DashboardsDefaultNamespace) Full(ctx context.Context, params *DashboardsDefaultFullParams, opts ...RequestOption) (*DashboardWithPins, error)
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 ¶
func (n *DashboardsNamespace) Create(ctx context.Context, params DashboardsCreateParams, opts ...RequestOption) (*DashboardFull, error)
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 ¶
func (n *DashboardsNamespace) Get(ctx context.Context, params DashboardsGetParams, opts ...RequestOption) (*DashboardWithPins, error)
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 ¶
func (n *DashboardsNamespace) List(ctx context.Context, params *DashboardsListParams, opts ...RequestOption) ([]Dashboard, error)
List: List dashboards
_Requires permission: `dashboards:read`._
GET /api/org/{orgId}/dashboards
func (*DashboardsNamespace) Probe ¶
func (n *DashboardsNamespace) Probe(ctx context.Context, params DashboardsProbeParams, opts ...RequestOption) (map[string]ProbeStatus, error)
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 ¶
func (n *DashboardsNamespace) ValidateTabs(ctx context.Context, params DashboardsValidateTabsParams, opts ...RequestOption) (*ValidateTabsResponse, error)
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 ¶
func (n *DashboardsPinNamespace) Create(ctx context.Context, params DashboardsPinCreateParams, opts ...RequestOption) (*OK, error)
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 ¶
func (n *DashboardsPinNamespace) Get(ctx context.Context, params DashboardsPinGetParams, opts ...RequestOption) (*PinFull, error)
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 ¶
func (n *DashboardsPinNamespace) Range(ctx context.Context, params DashboardsPinRangeParams, opts ...RequestOption) (*PinRangeResponse, error)
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 ¶
func (n *DashboardsWidgetsNamespace) Create(ctx context.Context, params DashboardsWidgetsCreateParams, opts ...RequestOption) (*DashboardWidgetFull, error)
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 ¶
func (n *DashboardsWidgetsNamespace) Delete(ctx context.Context, params DashboardsWidgetsDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Remove a widget from a dashboard
DELETE /api/org/{orgId}/dashboards/widgets/{widgetId}
Raises on 404: Not found
func (*DashboardsWidgetsNamespace) Update ¶
func (n *DashboardsWidgetsNamespace) Update(ctx context.Context, params DashboardsWidgetsUpdateParams, opts ...RequestOption) (*DashboardWidgetFull, error)
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
func (n *DependencyGraphNamespace) Get(ctx context.Context, params *DependencyGraphGetParams, opts ...RequestOption) (*DependencyGraphResponse, error)
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
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
func (n *DeploymentsNamespace) Envs(ctx context.Context, params *DeploymentsEnvsParams, opts ...RequestOption) (*DeployEnvs, error)
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
func (n *DeploymentsNamespace) Plan(ctx context.Context, params *DeploymentsPlanParams, opts ...RequestOption) (*DeployPlanResult, error)
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
func (n *DeploymentsNamespace) Repos(ctx context.Context, params *DeploymentsReposParams, opts ...RequestOption) ([]DeployRepo, error)
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
func (n *DeploymentsRunsNamespace) Create(ctx context.Context, params *DeploymentsRunsCreateParams, opts ...RequestOption) (*DeploymentsRunsCreateResponse, error)
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
func (n *DeploymentsRunsNamespace) Get(ctx context.Context, params DeploymentsRunsGetParams, opts ...RequestOption) (*DeploymentRun, error)
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
func (n *DeploymentsRunsNamespace) List(ctx context.Context, params *DeploymentsRunsListParams, opts ...RequestOption) ([]DeploymentRun, error)
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
func (n *DeploymentsRunsNamespace) Rollback(ctx context.Context, params DeploymentsRunsRollbackParams, opts ...RequestOption) (*DeployPlanResult, error)
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
func (n *DeploymentsTriggersNamespace) Create(ctx context.Context, params *DeploymentsTriggersCreateParams, opts ...RequestOption) (*DeployTrigger, error)
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
func (n *DeploymentsTriggersNamespace) Delete(ctx context.Context, params DeploymentsTriggersDeleteParams, opts ...RequestOption) (*OK, error)
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
func (n *DeploymentsTriggersNamespace) List(ctx context.Context, params *DeploymentsTriggersListParams, opts ...RequestOption) ([]DeployTrigger, error)
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
func (n *DeploymentsTriggersNamespace) Update(ctx context.Context, params DeploymentsTriggersUpdateParams, opts ...RequestOption) (*DeployTrigger, error)
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
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
func (n *DigestNamespace) Get(ctx context.Context, params *DigestGetParams, opts ...RequestOption) (*DigestSettings, error)
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
func (n *DigestNamespace) Send(ctx context.Context, params *DigestSendParams, opts ...RequestOption) (*DigestSendResult, error)
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
func (n *DigestNamespace) Update(ctx context.Context, params *DigestUpdateParams, opts ...RequestOption) (*DigestSettings, error)
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
func (n *DigestRecipientsNamespace) Create(ctx context.Context, params *DigestRecipientsCreateParams, opts ...RequestOption) (*DigestEmailRecipient, error)
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
func (n *DigestRecipientsNamespace) Delete(ctx context.Context, params DigestRecipientsDeleteParams, opts ...RequestOption) (*DigestRecipientsDeleteResponse, error)
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
func (n *DigestRecipientsNamespace) Get(ctx context.Context, params *DigestRecipientsGetParams, opts ...RequestOption) (*DigestEmailRecipientList, error)
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 DismissedPostureFinding ¶ added in v0.43.0
type DismissedPostureFinding 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"`
// RuleID: The matched rule's stable id, unique within the plugin.
RuleID string `json:"ruleId"`
// Title: Short rule title.
Title string `json:"title"`
// Severity: How bad the finding is. `critical` and `high` findings feed the
// posture alerts; `medium` and `low` are hygiene work surfaced on the
// posture screen only.
//
// One of "critical", "high", "medium", "low".
Severity string `json:"severity"`
// Category: Grouping bucket for what kind of exposure the finding describes.
//
// One of "public-exposure", "encryption", "credential-age",
// "data-protection", "other".
Category string `json:"category"`
// Reason: Plugin-authored explanation of why this is a finding.
Reason string `json:"reason"`
Dismissal PostureDismissal `json:"dismissal"`
}
DismissedPostureFinding is the `DismissedPostureFinding` schema.
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 ¶
func (n *DockerNamespace) Command(ctx context.Context, params DockerCommandParams, opts ...RequestOption) (*DockerCommandResponse, error)
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 EnvironmentDiffEntry ¶ added in v1.1.0
type EnvironmentDiffEntry struct {
// Key: The pairing key both sides matched on — the resource type plus the
// resource name with environment words removed. Stable across runs.
Key string `json:"key"`
ResourceTypeID string `json:"resourceTypeId"`
ResourceTypeName string `json:"resourceTypeName"`
// Status: Whether the slot exists on side A only, side B only, or on both
// with a field divergence. Matched pairs that agree are counted in the type
// summary rather than listed.
//
// One of "only-in-a", "only-in-b", "changed".
Status string `json:"status"`
A *EnvironmentDiffResourceRef `json:"a"`
B *EnvironmentDiffResourceRef `json:"b"`
// Changes: Field divergences. Empty unless `status` is `changed`.
Changes []EnvironmentDiffFieldChange `json:"changes"`
// SuppressedCount: Divergences hidden by the identity filter (ids, links,
// addresses, timestamps). Always 0 when `includeIdentityFields` was
// requested.
SuppressedCount int64 `json:"suppressedCount"`
}
EnvironmentDiffEntry is the `EnvironmentDiffEntry` schema.
type EnvironmentDiffFieldChange ¶ added in v1.1.0
type EnvironmentDiffFieldChange struct {
// Field: Field key; resolved-output keys are prefixed `outputs.`.
Field string `json:"field"`
// A: Value on side A; null when the key is absent there.
A any `json:"a,omitempty"`
// B: Value on side B.
B any `json:"b,omitempty"`
}
EnvironmentDiffFieldChange is the `EnvironmentDiffFieldChange` schema.
type EnvironmentDiffGetParams ¶ added in v1.1.0
type EnvironmentDiffGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// A: Baseline account id — by convention the environment that works.
A string
// B: Compared account id. Must differ from `a` and use the same provider.
B string
// ResourceTypeID: Compare one resource type only.
ResourceTypeID *string
// IncludeIdentityFields: Compare identity and timestamp fields too, instead
// of filtering them out.
//
// One of "true", "false".
IncludeIdentityFields *string
}
EnvironmentDiffGetParams holds the parameters for `client.environmentDiff.get`.
type EnvironmentDiffNamespace ¶ added in v1.1.0
type EnvironmentDiffNamespace struct {
// contains filtered or unexported fields
}
EnvironmentDiffNamespace is `client.environmentDiff`.
func (*EnvironmentDiffNamespace) Get ¶ added in v1.1.0
func (n *EnvironmentDiffNamespace) Get(ctx context.Context, params EnvironmentDiffGetParams, opts ...RequestOption) (*EnvironmentDiffResponse, error)
Get: Compare two accounts' resource inventories
Compares two accounts of the same provider — typically staging against production — over already-synced state: which resource types exist in one and not the other, the per-type count deltas, and the fields on which two corresponding resources disagree (instance class, engine version, feature flags).
Resources are paired by resource type plus name with environment words removed, so `api-staging` lines up with `api-prod` without any naming convention to configure. By default the comparison hides divergences that are artefacts of being two different resources — ids, links, network addresses and timestamps — because every resource has different ones; pass `includeIdentityFields=true` to see them.
Read-only and cheap: no provider API calls are made, so results reflect the last sync.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/environment-diff
Raises on 400: Bad request
Raises on 404: Not found
type EnvironmentDiffResourceRef ¶ added in v1.1.0
type EnvironmentDiffResourceRef struct {
// ResourceID: Infrawrench resource id.
ResourceID string `json:"resourceId"`
AccountID string `json:"accountId"`
DisplayName string `json:"displayName"`
// ExternalID: Provider-native id, when known.
ExternalID *string `json:"externalId"`
}
EnvironmentDiffResourceRef: Null when the resource exists only on B.
The API may send null in its place.
type EnvironmentDiffResponse ¶ added in v1.1.0
type EnvironmentDiffResponse struct {
A EnvironmentDiffSideSummary `json:"a"`
B EnvironmentDiffSideSummary `json:"b"`
PluginID PluginID `json:"pluginId"`
PluginName string `json:"pluginName"`
// Types: Every resource type present on either side, most-divergent first.
Types []EnvironmentDiffTypeSummary `json:"types"`
// Entries: Only the slots that differ; identical pairs are counted, not
// listed.
Entries []EnvironmentDiffEntry `json:"entries"`
Totals EnvironmentDiffTotals `json:"totals"`
// UnavailableTypes: Resource types excluded because they could not be
// listed. Always empty over this API — it reads already-synced rows, which
// cannot half-fail — and populated only by the desktop and CLI local modes,
// which list live.
IncludeIdentityFields bool `json:"includeIdentityFields"`
GeneratedAt string `json:"generatedAt"`
}
EnvironmentDiffResponse is the `EnvironmentDiffResponse` schema.
type EnvironmentDiffSideSummary ¶ added in v1.1.0
type EnvironmentDiffSideSummary struct {
AccountID string `json:"accountId"`
AccountName string `json:"accountName"`
// ResourceCount: Resources compared on this side.
ResourceCount int64 `json:"resourceCount"`
}
EnvironmentDiffSideSummary is the `EnvironmentDiffSideSummary` schema.
type EnvironmentDiffTotals ¶ added in v1.1.0
type EnvironmentDiffTotals struct {
OnlyInA int64 `json:"onlyInA"`
OnlyInB int64 `json:"onlyInB"`
Changed int64 `json:"changed"`
Identical int64 `json:"identical"`
TypesOnlyInA int64 `json:"typesOnlyInA"`
TypesOnlyInB int64 `json:"typesOnlyInB"`
// SuppressedFieldChanges: Field divergences the identity filter hid across
// every pair.
SuppressedFieldChanges int64 `json:"suppressedFieldChanges"`
}
EnvironmentDiffTotals is the `EnvironmentDiffTotals` schema.
type EnvironmentDiffTypeSummary ¶ added in v1.1.0
type EnvironmentDiffTypeSummary struct {
ResourceTypeID string `json:"resourceTypeId"`
ResourceTypeName string `json:"resourceTypeName"`
CountA int64 `json:"countA"`
CountB int64 `json:"countB"`
// Delta: `countB - countA`.
Delta int64 `json:"delta"`
OnlyInA int64 `json:"onlyInA"`
OnlyInB int64 `json:"onlyInB"`
// Changed: Matched pairs that disagree on at least one field.
Changed int64 `json:"changed"`
// Identical: Matched pairs with no visible divergence.
Identical int64 `json:"identical"`
// MissingFrom: Set when the resource type is absent from that side entirely.
//
// One of "a", "b".
MissingFrom *string `json:"missingFrom"`
}
EnvironmentDiffTypeSummary is the `EnvironmentDiffTypeSummary` schema.
type EnvironmentDiffUnavailableType ¶ added in v1.1.0
type EnvironmentDiffUnavailableType struct {
Message string `json:"message"`
}
EnvironmentDiffUnavailableType is the `EnvironmentDiffUnavailableType` schema.
type Error ¶
type Error struct {
// Error: Human-readable error message
Error string `json:"error"`
}
Error is the `Error` schema.
type EscalationPolicy ¶ added in v1.0.0
type EscalationPolicy struct {
AfterMinutes int64 `json:"afterMinutes"`
Destinations []AlertDestination `json:"destinations"`
}
EscalationPolicy: Notify these destinations too if nobody acknowledges within afterMinutes. Acknowledgement comes from the button on the Slack message, so an alert routed only to Teams or push will always escalate.
The API may send null in its place.
type ExchangeRate ¶ added in v1.6.0
type ExchangeRate struct {
ID string `json:"id"`
// FromCurrency: ISO 4217 code, upper-case.
FromCurrency string `json:"fromCurrency"`
// ToCurrency: ISO 4217 code, upper-case.
ToCurrency string `json:"toCurrency"`
// Rate: Multiply an amount in `fromCurrency` by this to get `toCurrency`. A
// decimal **string**, not a number: it is stored in a `numeric(20, 10)`
// column so the digits your finance system used survive the round trip
// exactly, and a JSON number could not promise that.
Rate string `json:"rate"`
// EffectiveFrom: Inclusive day this rate starts applying. A given day
// converts at the rate with the greatest `effectiveFrom` on or before it, so
// historical periods keep the rate that applied then. A day earlier than
// every stated rate has no rate.
EffectiveFrom string `json:"effectiveFrom"`
CreatedBy *string `json:"createdBy"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
ExchangeRate is the `ExchangeRate` schema.
type ExchangeRateInput ¶ added in v1.6.0
type ExchangeRateInput struct {
// FromCurrency: ISO 4217 code, upper-case.
FromCurrency string `json:"fromCurrency"`
// ToCurrency: ISO 4217 code, upper-case.
ToCurrency string `json:"toCurrency"`
// Rate: Multiply an amount in `fromCurrency` by this to get `toCurrency`. A
// decimal **string**, not a number: it is stored in a `numeric(20, 10)`
// column so the digits your finance system used survive the round trip
// exactly, and a JSON number could not promise that.
Rate string `json:"rate"`
EffectiveFrom string `json:"effectiveFrom"`
}
ExchangeRateInput is the `ExchangeRateInput` 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
func (n *ExpiringNamespace) Get(ctx context.Context, params *ExpiringGetParams, opts ...RequestOption) (*ExpiryListResponse, error)
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
func (n *ExpiringSettingsNamespace) Get(ctx context.Context, params *ExpiringSettingsGetParams, opts ...RequestOption) (*ExpiryAlertSettings, error)
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
func (n *ExpiringSettingsNamespace) Update(ctx context.Context, params *ExpiringSettingsUpdateParams, opts ...RequestOption) (*ExpiryAlertSettings, error)
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 ExportTerraformRequest ¶ added in v1.3.0
type ExportTerraformRequest struct {
ResourceID ResourceID `json:"resourceId"`
AccountID string `json:"accountId"`
}
ExportTerraformRequest is the `ExportTerraformRequest` 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 ¶
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 HygieneFinding ¶ added in v0.43.0
type HygieneFinding struct {
// ID: Stable across runs, so a client can remember what has been reviewed.
ID string `json:"id"`
// Kind: One of "api_key_never_used", "api_key_idle",
// "api_key_expired_not_revoked", "api_key_wildcard_scope",
// "api_key_unused_scopes", "ssh_key_never_used", "ssh_key_idle",
// "member_unused_permissions".
Kind string `json:"kind"`
// Severity: One of "high", "medium", "low".
Severity string `json:"severity"`
Title string `json:"title"`
// Detail: The evidence behind the finding.
Detail string `json:"detail"`
Recommendation string `json:"recommendation"`
// EntityType: One of "api-key", "ssh-key", "member".
EntityType string `json:"entityType"`
EntityID string `json:"entityId"`
EntityName string `json:"entityName"`
// Facts: Structured detail for table columns and reports.
Facts map[string]any `json:"facts"`
}
HygieneFinding is the `HygieneFinding` schema.
type HygieneReport ¶ added in v0.43.0
type HygieneReport struct {
GeneratedAt string `json:"generatedAt"`
WindowDays int64 `json:"windowDays"`
// AuditHistoryDays: How much audit history the organization actually has;
// null when it has none.
AuditHistoryDays *int64 `json:"auditHistoryDays"`
// PermissionFindingsWithheld: True when there was not enough audit history
// for the unused-permission finding to mean anything, so it was withheld
// rather than guessed at.
PermissionFindingsWithheld bool `json:"permissionFindingsWithheld"`
Findings []HygieneFinding `json:"findings"`
Counts HygieneReportCounts `json:"counts"`
}
HygieneReport is the `HygieneReport` schema.
type HygieneReportCounts ¶ added in v0.43.0
type HygieneReportCounts struct {
High int64 `json:"high"`
Medium int64 `json:"medium"`
Low int64 `json:"low"`
Total int64 `json:"total"`
}
HygieneReportCounts is an object the spec declares inline.
type ImportSSHKeyRequest ¶
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 ¶
func (n *InvitationsByTokenNamespace) Get(ctx context.Context, params InvitationsByTokenGetParams, opts ...RequestOption) (*InvitationDetail, error)
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 ¶
func (n *InvitationsNamespace) Accept(ctx context.Context, params InvitationsAcceptParams, opts ...RequestOption) (*AcceptInvitationResponse, error)
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 monthly seat and send the invitation. Requires
// billing:write. Only works when the 409 reported `canAddSeat: true` — an
// org whose capacity is entirely prepaid capacity slots has no monthly seat
// to add.
AddSeat *bool `json:"addSeat,omitempty"`
}
InviteRequest is the `InviteRequest` schema.
type InviteResponse ¶
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 ¶
JSONObject: Free-form JSON object whose shape depends on the plugin.
Spec schema: `JsonObject`.
type JiraDeleteParams ¶ added in v1.6.0
type JiraDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
JiraDeleteParams holds the parameters for `client.jira.delete`.
Every field is optional; pass nil to take the defaults.
type JiraGetParams ¶ added in v1.6.0
type JiraGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
JiraGetParams holds the parameters for `client.jira.get`.
Every field is optional; pass nil to take the defaults.
type JiraGetResponse ¶ added in v1.6.0
type JiraGetResponse struct {
Integration *JiraIntegration `json:"integration"`
}
JiraGetResponse is an object the spec declares inline.
type JiraIntegration ¶ added in v1.6.0
type JiraIntegration struct {
SiteURL string `json:"siteUrl"`
AccountEmail string `json:"accountEmail"`
// TokenHint: Redacted marker for the stored API token, e.g. `…a7f2`. The
// token itself is never returned.
TokenHint string `json:"tokenHint"`
DefaultProjectKey *string `json:"defaultProjectKey"`
DefaultIssueTypeID *string `json:"defaultIssueTypeId"`
UpdatedAt string `json:"updatedAt"`
}
JiraIntegration is the `JiraIntegration` schema.
The API may send null in its place.
type JiraIntegrationInput ¶ added in v1.6.0
type JiraIntegrationInput struct {
// SiteURL: Jira Cloud site address. Must resolve to a .atlassian.net (or
// legacy .jira.com) host; a bare hostname and a pasted board or issue URL
// are both accepted and normalized.
SiteURL string `json:"siteUrl"`
// AccountEmail: Atlassian account email — the username half of the
// basic-auth pair.
AccountEmail string `json:"accountEmail"`
// APIToken: API token from id.atlassian.com. Omit to keep the stored token;
// required on first connect.
APIToken *string `json:"apiToken,omitempty"`
DefaultProjectKey *string `json:"defaultProjectKey,omitempty"`
DefaultIssueTypeID *string `json:"defaultIssueTypeId,omitempty"`
}
JiraIntegrationInput is the `JiraIntegrationInput` schema.
type JiraIssueLink ¶ added in v1.6.0
type JiraIssueLink struct {
ID string `json:"id"`
SourceKind JiraSourceKind `json:"sourceKind"`
SourceID string `json:"sourceId"`
IssueKey string `json:"issueKey"`
IssueURL string `json:"issueUrl"`
CreatedByUserID *string `json:"createdByUserId"`
CreatedAt string `json:"createdAt"`
}
JiraIssueLink is the `JiraIssueLink` schema.
type JiraIssueType ¶ added in v1.6.0
type JiraIssueType struct {
ID string `json:"id"`
Name string `json:"name"`
// Subtask: Always false — subtasks need a parent issue, so they are filtered
// out.
Subtask bool `json:"subtask"`
Description *string `json:"description"`
}
JiraIssueType is the `JiraIssueType` schema.
type JiraIssuesParams ¶ added in v1.6.0
type JiraIssuesParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body CreateJiraIssueInput
}
JiraIssuesParams holds the parameters for `client.jira.issues`.
type JiraLinksParams ¶ added in v1.6.0
type JiraLinksParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
SourceKind *JiraSourceKind
// SourceID: Repeat to narrow to specific findings. Omit to return every link
// of the kind — this is the batch lookup a list view makes once instead of
// one request per row.
SourceID []string
}
JiraLinksParams holds the parameters for `client.jira.links`.
Every field is optional; pass nil to take the defaults.
type JiraNamespace ¶ added in v1.6.0
type JiraNamespace struct {
// Projects: `client.jira.projects`.
Projects *JiraProjectsNamespace
// contains filtered or unexported fields
}
JiraNamespace is `client.jira`.
func (*JiraNamespace) Delete ¶ added in v1.6.0
func (n *JiraNamespace) Delete(ctx context.Context, params *JiraDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Disconnect Jira
Issue links already recorded are kept, so filed findings stay marked as filed.
_Requires permission: `jira:write`._
DELETE /api/org/{orgId}/jira
Raises on 404: Not found
func (*JiraNamespace) Get ¶ added in v1.6.0
func (n *JiraNamespace) Get(ctx context.Context, params *JiraGetParams, opts ...RequestOption) (*JiraGetResponse, error)
Get: Get the org's Jira connection
The stored API token is never returned; `tokenHint` stands in for it.
_Requires permission: `jira:read`._
GET /api/org/{orgId}/jira
func (*JiraNamespace) Issues ¶ added in v1.6.0
func (n *JiraNamespace) Issues(ctx context.Context, params JiraIssuesParams, opts ...RequestOption) (*CreateJiraIssueResult, error)
Issues: File a finding as a Jira issue
Creates the issue, then records the link between it and the finding. The link is what lets a list view show "already filed" instead of offering the button again.
_Requires permission: `jira:write`._
POST /api/org/{orgId}/jira/issues
Raises on 400: Bad request
Raises on 502: Jira refused to create the issue, or was unreachable
func (*JiraNamespace) Links ¶ added in v1.6.0
func (n *JiraNamespace) Links(ctx context.Context, params *JiraLinksParams, opts ...RequestOption) ([]JiraIssueLink, error)
Links: Look up filed issues for a set of findings
_Requires permission: `jira:read`._
GET /api/org/{orgId}/jira/links
Raises on 400: Bad request
func (*JiraNamespace) Update ¶ added in v1.6.0
func (n *JiraNamespace) Update(ctx context.Context, params JiraUpdateParams, opts ...RequestOption) (*JiraIntegration, error)
Update: Connect Jira, or update the connection
_Requires permission: `jira:write`._
PUT /api/org/{orgId}/jira
Raises on 400: Bad request
func (*JiraNamespace) Verify ¶ added in v1.6.0
func (n *JiraNamespace) Verify(ctx context.Context, params *JiraVerifyParams, opts ...RequestOption) (*JiraVerifyResult, error)
Verify: Check Jira credentials
Calls GET /rest/api/3/myself on the site, so a wrong email or a revoked token is reported on the settings form rather than on the first attempt to file an issue.
_Requires permission: `jira:write`._
POST /api/org/{orgId}/jira/verify
Raises on 400: Bad request
Raises on 502: Jira rejected the credentials or was unreachable
type JiraProject ¶ added in v1.6.0
JiraProject is the `JiraProject` schema.
type JiraProjectsIssueTypesParams ¶ added in v1.6.0
type JiraProjectsIssueTypesParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
Key string
}
JiraProjectsIssueTypesParams holds the parameters for `client.jira.projects.issueTypes`.
type JiraProjectsListParams ¶ added in v1.6.0
type JiraProjectsListParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
JiraProjectsListParams holds the parameters for `client.jira.projects.list`.
Every field is optional; pass nil to take the defaults.
type JiraProjectsNamespace ¶ added in v1.6.0
type JiraProjectsNamespace struct {
// contains filtered or unexported fields
}
JiraProjectsNamespace is `client.jira.projects`.
func (*JiraProjectsNamespace) IssueTypes ¶ added in v1.6.0
func (n *JiraProjectsNamespace) IssueTypes(ctx context.Context, params JiraProjectsIssueTypesParams, opts ...RequestOption) ([]JiraIssueType, error)
IssueTypes: List issue types valid in a project
Reads the project's own create metadata rather than the global issue-type list, so the picker cannot offer a type the project's scheme would reject. Subtasks are excluded.
_Requires permission: `jira:read`._
GET /api/org/{orgId}/jira/projects/{key}/issue-types
Raises on 400: Bad request
func (*JiraProjectsNamespace) List ¶ added in v1.6.0
func (n *JiraProjectsNamespace) List(ctx context.Context, params *JiraProjectsListParams, opts ...RequestOption) ([]JiraProject, error)
List: List Jira projects
Backs the project picker, so nobody has to know a project key by hand.
_Requires permission: `jira:read`._
GET /api/org/{orgId}/jira/projects
Raises on 400: Bad request
type JiraSourceKind ¶ added in v1.6.0
type JiraSourceKind = string
JiraSourceKind: Which detector produced the finding the issue was filed from.
const ( JiraSourceKindCostAnomaly JiraSourceKind = "cost_anomaly" JiraSourceKindOrphan JiraSourceKind = "orphan" JiraSourceKindOversized JiraSourceKind = "oversized" JiraSourceKindPostureFinding JiraSourceKind = "posture_finding" JiraSourceKindExpiring JiraSourceKind = "expiring" JiraSourceKindProbe JiraSourceKind = "probe" )
The values JiraSourceKind takes.
type JiraUpdateParams ¶ added in v1.6.0
type JiraUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body JiraIntegrationInput
}
JiraUpdateParams holds the parameters for `client.jira.update`.
type JiraVerifyInput ¶ added in v1.6.0
type JiraVerifyInput struct {
SiteURL *string `json:"siteUrl,omitempty"`
AccountEmail *string `json:"accountEmail,omitempty"`
APIToken *string `json:"apiToken,omitempty"`
}
JiraVerifyInput: Supply all three to test credentials that have not been saved yet; send an empty object to re-test the stored ones.
type JiraVerifyParams ¶ added in v1.6.0
type JiraVerifyParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *JiraVerifyInput
}
JiraVerifyParams holds the parameters for `client.jira.verify`.
Every field is optional; pass nil to take the defaults.
type JiraVerifyResult ¶ added in v1.6.0
type JiraVerifyResult struct {
OK bool `json:"ok"`
AccountID string `json:"accountId"`
DisplayName string `json:"displayName"`
EmailAddress *string `json:"emailAddress"`
}
JiraVerifyResult is the `JiraVerifyResult` schema.
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 LeaseConflict ¶ added in v0.33.0
type LeaseConflict struct {
Error string `json:"error"`
}
LeaseConflict is the `LeaseConflict` schema.
type LeasesCancelParams ¶ added in v0.33.0
type LeasesCancelParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
LeaseID string
}
LeasesCancelParams holds the parameters for `client.leases.cancel`.
type LeasesCreateParams ¶ added in v0.33.0
type LeasesCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *ResourceLeaseCreate
}
LeasesCreateParams holds the parameters for `client.leases.create`.
Every field is optional; pass nil to take the defaults.
type LeasesDeleteParams ¶ added in v0.33.0
type LeasesDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
LeaseID string
}
LeasesDeleteParams holds the parameters for `client.leases.delete`.
type LeasesGetParams ¶ added in v0.33.0
type LeasesGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
LeasesGetParams holds the parameters for `client.leases.get`.
Every field is optional; pass nil to take the defaults.
type LeasesNamespace ¶ added in v0.33.0
type LeasesNamespace struct {
// contains filtered or unexported fields
}
LeasesNamespace is `client.leases`.
func (*LeasesNamespace) Cancel ¶ added in v0.33.0
func (n *LeasesNamespace) Cancel(ctx context.Context, params LeasesCancelParams, opts ...RequestOption) (*ResourceLease, error)
Cancel: Cancel a lease
Stop the countdown — the resource stays, the lease goes `canceled` and leaves the expiry radar. Audit-logged.
_Requires permission: `resources:write`._
POST /api/org/{orgId}/leases/{leaseId}/cancel
Raises on 400: Bad request
Raises on 404: Not found
func (*LeasesNamespace) Create ¶ added in v0.33.0
func (n *LeasesNamespace) Create(ctx context.Context, params *LeasesCreateParams, opts ...RequestOption) (*ResourceLease, error)
Create: Create a resource lease
Attach an expiry to a resource — 'give me a test cluster for 3 days'. One lease per resource (an active lease conflicts; a terminal one is replaced). `autoDelete: true` opts into deletion at expiry — the poller announces it twice first, defers during change freezes, and requires the caller to hold `resources:delete`. Audit-logged.
_Requires permission: `resources:write`._
POST /api/org/{orgId}/leases
Raises on 400: Bad request
Raises on 404: Not found
Raises on 409: The resource already has an active lease
func (*LeasesNamespace) Delete ¶ added in v0.33.0
func (n *LeasesNamespace) Delete(ctx context.Context, params LeasesDeleteParams, opts ...RequestOption) error
Delete: Delete a lease row
Remove the lease record entirely (including terminal rows). The resource is not touched. Audit-logged.
_Requires permission: `resources:write`._
DELETE /api/org/{orgId}/leases/{leaseId}
Raises on 404: Not found
func (*LeasesNamespace) Get ¶ added in v0.33.0
func (n *LeasesNamespace) Get(ctx context.Context, params *LeasesGetParams, opts ...RequestOption) (*ResourceLeaseList, error)
Get: List resource leases
Every lease in the organization, soonest deadline first. Active leases also appear on the expiry radar (`GET /expiring`) as kind `lease` items, so the owner is nagged through the existing expiry alerts.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/leases
func (*LeasesNamespace) Resource ¶ added in v0.33.0
func (n *LeasesNamespace) Resource(ctx context.Context, params LeasesResourceParams, opts ...RequestOption) (*ResourceLeaseLookup, error)
Resource: Get one resource's lease
The (unique) lease on a resource, whatever its status, or null.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/leases/resource
Raises on 400: Bad request
func (*LeasesNamespace) Update ¶ added in v0.33.0
func (n *LeasesNamespace) Update(ctx context.Context, params LeasesUpdateParams, opts ...RequestOption) (*ResourceLease, error)
Update: Update a lease
Edit the deadline, the auto-delete opt-in and/or the note of an active lease. Changing the deadline or the auto-delete flag re-arms the two-announcement schedule. Audit-logged.
_Requires permission: `resources:write`._
PUT /api/org/{orgId}/leases/{leaseId}
Raises on 400: Bad request
Raises on 404: Not found
type LeasesResourceParams ¶ added in v0.33.0
type LeasesResourceParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ResourceID string
}
LeasesResourceParams holds the parameters for `client.leases.resource`.
type LeasesUpdateParams ¶ added in v0.33.0
type LeasesUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
LeaseID string
// Body: the JSON request body.
Body *ResourceLeaseUpdate
}
LeasesUpdateParams holds the parameters for `client.leases.update`.
type LinearDeleteParams ¶ added in v1.6.0
type LinearDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
LinearDeleteParams holds the parameters for `client.linear.delete`.
Every field is optional; pass nil to take the defaults.
type LinearGetParams ¶ added in v1.6.0
type LinearGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
LinearGetParams holds the parameters for `client.linear.get`.
Every field is optional; pass nil to take the defaults.
type LinearGetResponse ¶ added in v1.6.0
type LinearGetResponse struct {
Integration *LinearIntegration `json:"integration"`
}
LinearGetResponse is an object the spec declares inline.
type LinearIntegration ¶ added in v1.6.0
type LinearIntegration struct {
// KeyHint: Redacted marker for the stored personal API key, e.g. `…a7f2`.
// The key itself is never returned.
KeyHint string `json:"keyHint"`
// DefaultTeamID: Team the file-issue window preselects. A Linear team id,
// not a team key.
DefaultTeamID *string `json:"defaultTeamId"`
UpdatedAt string `json:"updatedAt"`
}
LinearIntegration is the `LinearIntegration` schema.
The API may send null in its place.
type LinearIntegrationInput ¶ added in v1.6.0
type LinearIntegrationInput struct {
// APIKey: Personal API key from Linear → Settings → Security & access. Omit
// to keep the stored key; required on first connect.
APIKey *string `json:"apiKey,omitempty"`
DefaultTeamID *string `json:"defaultTeamId,omitempty"`
}
LinearIntegrationInput is the `LinearIntegrationInput` schema.
type LinearIssueLink ¶ added in v1.6.0
type LinearIssueLink struct {
ID string `json:"id"`
SourceKind LinearSourceKind `json:"sourceKind"`
SourceID string `json:"sourceId"`
IssueIdentifier string `json:"issueIdentifier"`
IssueURL string `json:"issueUrl"`
CreatedByUserID *string `json:"createdByUserId"`
CreatedAt string `json:"createdAt"`
}
LinearIssueLink is the `LinearIssueLink` schema.
type LinearIssuesParams ¶ added in v1.6.0
type LinearIssuesParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body CreateLinearIssueInput
}
LinearIssuesParams holds the parameters for `client.linear.issues`.
type LinearLinksParams ¶ added in v1.6.0
type LinearLinksParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
SourceKind *LinearSourceKind
// SourceID: Repeat to narrow to specific findings. Omit to return every link
// of the kind — this is the batch lookup a list view makes once instead of
// one request per row.
SourceID []string
}
LinearLinksParams holds the parameters for `client.linear.links`.
Every field is optional; pass nil to take the defaults.
type LinearNamespace ¶ added in v1.6.0
type LinearNamespace struct {
// contains filtered or unexported fields
}
LinearNamespace is `client.linear`.
func (*LinearNamespace) Delete ¶ added in v1.6.0
func (n *LinearNamespace) Delete(ctx context.Context, params *LinearDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Disconnect Linear
Issue links already recorded are kept, so filed findings stay marked as filed.
_Requires permission: `linear:write`._
DELETE /api/org/{orgId}/linear
Raises on 404: Not found
func (*LinearNamespace) Get ¶ added in v1.6.0
func (n *LinearNamespace) Get(ctx context.Context, params *LinearGetParams, opts ...RequestOption) (*LinearGetResponse, error)
Get: Get the org's Linear connection
The stored API key is never returned; `keyHint` stands in for it.
_Requires permission: `linear:read`._
GET /api/org/{orgId}/linear
func (*LinearNamespace) Issues ¶ added in v1.6.0
func (n *LinearNamespace) Issues(ctx context.Context, params LinearIssuesParams, opts ...RequestOption) (*CreateLinearIssueResult, error)
Issues: File a finding as a Linear issue
Creates the issue via the issueCreate mutation, then records the link between it and the finding. The link is what lets a list view show "already filed" instead of offering the button again.
_Requires permission: `linear:write`._
POST /api/org/{orgId}/linear/issues
Raises on 400: Bad request
Raises on 502: Linear refused to create the issue, or was unreachable
func (*LinearNamespace) Links ¶ added in v1.6.0
func (n *LinearNamespace) Links(ctx context.Context, params *LinearLinksParams, opts ...RequestOption) ([]LinearIssueLink, error)
Links: Look up filed issues for a set of findings
_Requires permission: `linear:read`._
GET /api/org/{orgId}/linear/links
Raises on 400: Bad request
func (*LinearNamespace) Teams ¶ added in v1.6.0
func (n *LinearNamespace) Teams(ctx context.Context, params *LinearTeamsParams, opts ...RequestOption) ([]LinearTeam, error)
Teams: List Linear teams
Backs the team picker, so nobody has to know a team id by hand — issueCreate requires one, and every issue belongs to exactly one team.
_Requires permission: `linear:read`._
GET /api/org/{orgId}/linear/teams
Raises on 400: Bad request
func (*LinearNamespace) Update ¶ added in v1.6.0
func (n *LinearNamespace) Update(ctx context.Context, params LinearUpdateParams, opts ...RequestOption) (*LinearIntegration, error)
Update: Connect Linear, or update the connection
_Requires permission: `linear:write`._
PUT /api/org/{orgId}/linear
Raises on 400: Bad request
func (*LinearNamespace) Verify ¶ added in v1.6.0
func (n *LinearNamespace) Verify(ctx context.Context, params *LinearVerifyParams, opts ...RequestOption) (*LinearVerifyResult, error)
Verify: Check Linear credentials
Runs the `viewer` query against the Linear GraphQL API, so a mistyped or revoked key is reported on the settings form rather than on the first attempt to file an issue.
_Requires permission: `linear:write`._
POST /api/org/{orgId}/linear/verify
Raises on 400: Bad request
Raises on 502: Linear rejected the key or was unreachable
type LinearSourceKind ¶ added in v1.6.0
type LinearSourceKind = string
LinearSourceKind: Which detector produced the finding the issue was filed from.
const ( LinearSourceKindCostAnomaly LinearSourceKind = "cost_anomaly" LinearSourceKindOrphan LinearSourceKind = "orphan" LinearSourceKindOversized LinearSourceKind = "oversized" LinearSourceKindPostureFinding LinearSourceKind = "posture_finding" LinearSourceKindExpiring LinearSourceKind = "expiring" LinearSourceKindProbe LinearSourceKind = "probe" )
The values LinearSourceKind takes.
type LinearTeam ¶ added in v1.6.0
type LinearTeam struct {
// ID: Team id (UUID) — what issueCreate wants.
ID string `json:"id"`
// Key: Short prefix issue identifiers are built from.
Key string `json:"key"`
Name string `json:"name"`
}
LinearTeam is the `LinearTeam` schema.
type LinearTeamsParams ¶ added in v1.6.0
type LinearTeamsParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
LinearTeamsParams holds the parameters for `client.linear.teams`.
Every field is optional; pass nil to take the defaults.
type LinearUpdateParams ¶ added in v1.6.0
type LinearUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body LinearIntegrationInput
}
LinearUpdateParams holds the parameters for `client.linear.update`.
type LinearVerifyInput ¶ added in v1.6.0
type LinearVerifyInput struct {
APIKey *string `json:"apiKey,omitempty"`
}
LinearVerifyInput: Supply a key to test one that has not been saved yet; send an empty object to re-test the stored one.
type LinearVerifyParams ¶ added in v1.6.0
type LinearVerifyParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *LinearVerifyInput
}
LinearVerifyParams holds the parameters for `client.linear.verify`.
Every field is optional; pass nil to take the defaults.
type LinearVerifyResult ¶ added in v1.6.0
type LinearVerifyResult struct {
OK bool `json:"ok"`
ID string `json:"id"`
Name string `json:"name"`
Email *string `json:"email"`
}
LinearVerifyResult: The Linear user behind the API key, from the `viewer` query.
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
func (n *LogWorkspacesNamespace) Create(ctx context.Context, params LogWorkspacesCreateParams, opts ...RequestOption) (*LogWorkspaceQuery, error)
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
func (n *LogWorkspacesNamespace) Delete(ctx context.Context, params LogWorkspacesDeleteParams, opts ...RequestOption) error
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
func (n *LogWorkspacesNamespace) Get(ctx context.Context, params *LogWorkspacesGetParams, opts ...RequestOption) (*LogWorkspaceQueryList, error)
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
func (n *LogWorkspacesNamespace) Resources(ctx context.Context, params *LogWorkspacesResourcesParams, opts ...RequestOption) (*LogCapableResourceList, error)
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
func (n *LogWorkspacesNamespace) Update(ctx context.Context, params LogWorkspacesUpdateParams, opts ...RequestOption) (*LogWorkspaceQuery, error)
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
func (n *MetricAlertsNamespace) Create(ctx context.Context, params MetricAlertsCreateParams, opts ...RequestOption) (*MetricAlertRule, error)
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
func (n *MetricAlertsNamespace) Delete(ctx context.Context, params MetricAlertsDeleteParams, opts ...RequestOption) (*OK, error)
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
func (n *MetricAlertsNamespace) Events(ctx context.Context, params *MetricAlertsEventsParams, opts ...RequestOption) ([]MetricAlertEvent, error)
Events: Recent metric alert firings
GET /api/org/{orgId}/metric-alerts/events
func (*MetricAlertsNamespace) Get ¶ added in v0.30.0
func (n *MetricAlertsNamespace) Get(ctx context.Context, params MetricAlertsGetParams, opts ...RequestOption) (*MetricAlertRule, error)
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
func (n *MetricAlertsNamespace) List(ctx context.Context, params *MetricAlertsListParams, opts ...RequestOption) ([]MetricAlertRuleWithStatus, error)
List: List metric alert rules with live firing status
GET /api/org/{orgId}/metric-alerts
func (*MetricAlertsNamespace) MetricKeys ¶ added in v0.30.0
func (n *MetricAlertsNamespace) MetricKeys(ctx context.Context, params *MetricAlertsMetricKeysParams, opts ...RequestOption) ([]MetricSeriesKey, error)
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
func (n *MetricAlertsNamespace) SelectorOptions(ctx context.Context, params *MetricAlertsSelectorOptionsParams, opts ...RequestOption) (*MetricAlertSelectorOptions, error)
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
func (n *MetricAlertsNamespace) SelectorPreview(ctx context.Context, params *MetricAlertsSelectorPreviewParams, opts ...RequestOption) (*MetricAlertSelectorPreview, error)
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
func (n *MetricAlertsNamespace) Update(ctx context.Context, params MetricAlertsUpdateParams, opts ...RequestOption) (*MetricAlertRule, error)
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 ¶ added in v0.29.0
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
func (n *MomentNamespace) Get(ctx context.Context, params *MomentGetParams, opts ...RequestOption) (*MomentResponse, error)
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"`
}
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"`
}
MsTeamsWebhookCreate is the `MsTeamsWebhookCreate` schema.
type MsTeamsWebhookUpdate ¶ added in v0.4.0
type MsTeamsWebhookUpdate struct {
Label string `json:"label"`
}
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
func (n *MsteamsNamespace) Status(ctx context.Context, params *MsteamsStatusParams, opts ...RequestOption) (*MsTeamsStatus, error)
Status: List the organization's Teams channels
Returns the Teams channels alerts can be routed to. Which alerts reach each one is decided by /alert-rules. Webhook URLs are never included.
GET /api/org/{orgId}/msteams/status
func (*MsteamsNamespace) Test ¶ added in v0.4.0
func (n *MsteamsNamespace) Test(ctx context.Context, params *MsteamsTestParams, opts ...RequestOption) (*MsteamsTestResponse, error)
Test: Post a test card to every configured Teams channel
Ignores routing rules — 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
func (n *MsteamsWebhooksNamespace) Create(ctx context.Context, params *MsteamsWebhooksCreateParams, opts ...RequestOption) (*MsTeamsWebhook, error)
Create: Connect a Teams channel as an alert destination
Adds a channel by webhook URL, or updates the one already holding that URL. Which alerts reach it is decided by /alert-rules — connecting a channel routes nothing to it on its own. 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
func (n *MsteamsWebhooksNamespace) Delete(ctx context.Context, params MsteamsWebhooksDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Disconnect a Teams channel
DELETE /api/org/{orgId}/msteams/webhooks/{id}
Raises on 404: Not found
func (*MsteamsWebhooksNamespace) Update ¶ added in v0.4.0
func (n *MsteamsWebhooksNamespace) Update(ctx context.Context, params MsteamsWebhooksUpdateParams, opts ...RequestOption) (*MsTeamsWebhook, error)
Update: Rename a Teams channel
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 OrgConfigAlertSettings ¶ added in v1.2.0
type OrgConfigAlertSettings struct {
CostAnomaly *OrgConfigAlertSettingsCostAnomaly `json:"costAnomaly,omitempty"`
Drift *OrgConfigAlertSettingsDrift `json:"drift,omitempty"`
Expiry *OrgConfigAlertSettingsExpiry `json:"expiry,omitempty"`
Posture *OrgConfigAlertSettingsPosture `json:"posture,omitempty"`
Digest *OrgConfigAlertSettingsDigest `json:"digest,omitempty"`
}
OrgConfigAlertSettings: Org-wide notification tuning. Cooldown claims (`lastNotifiedAt`, `lastSentWeekStart`) are deliberately absent: they are poller state, and resetting one from an apply would re-open a quiet period and page people twice.
type OrgConfigAlertSettingsCostAnomaly ¶ added in v1.2.0
type OrgConfigAlertSettingsCostAnomaly struct {
Sigmas float64 `json:"sigmas"`
MinDeltaCents int64 `json:"minDeltaCents"`
NewSourceMinCents int64 `json:"newSourceMinCents"`
// SmsAlerts: One of "off", "new_source", "all".
SmsAlerts string `json:"smsAlerts"`
}
OrgConfigAlertSettingsCostAnomaly is an object the spec declares inline.
type OrgConfigAlertSettingsDigest ¶ added in v1.2.0
type OrgConfigAlertSettingsDigest struct {
Enabled bool `json:"enabled"`
Timezone string `json:"timezone"`
SendDay int64 `json:"sendDay"`
SendHour int64 `json:"sendHour"`
NarrativeEnabled bool `json:"narrativeEnabled"`
Recipients []string `json:"recipients"`
}
OrgConfigAlertSettingsDigest is an object the spec declares inline.
type OrgConfigAlertSettingsDrift ¶ added in v1.2.0
type OrgConfigAlertSettingsDrift struct {
NotifyCreated bool `json:"notifyCreated"`
NotifyUpdated bool `json:"notifyUpdated"`
NotifyDeleted bool `json:"notifyDeleted"`
CooldownMinutes int64 `json:"cooldownMinutes"`
MinChanges int64 `json:"minChanges"`
// Accounts: Account display names; empty means every account.
Accounts []string `json:"accounts"`
}
OrgConfigAlertSettingsDrift is an object the spec declares inline.
type OrgConfigAlertSettingsExpiry ¶ added in v1.2.0
type OrgConfigAlertSettingsExpiry struct {
Enabled bool `json:"enabled"`
LeadDays int64 `json:"leadDays"`
}
OrgConfigAlertSettingsExpiry is an object the spec declares inline.
type OrgConfigAlertSettingsPosture ¶ added in v1.2.0
type OrgConfigAlertSettingsPosture struct {
Enabled bool `json:"enabled"`
}
OrgConfigAlertSettingsPosture is an object the spec declares inline.
type OrgConfigApplyResult ¶ added in v1.2.0
type OrgConfigApplyResult struct {
// Mode: One of "merge", "replace".
Mode string `json:"mode"`
Changes []OrgConfigChange `json:"changes"`
Unresolved []OrgConfigUnresolved `json:"unresolved"`
Counts OrgConfigApplyResultCounts `json:"counts"`
Applied bool `json:"applied"`
}
OrgConfigApplyResult is the `OrgConfigApplyResult` schema.
type OrgConfigApplyResultCounts ¶ added in v1.2.0
type OrgConfigApplyResultCounts struct {
Create int64 `json:"create"`
Update int64 `json:"update"`
Delete int64 `json:"delete"`
Unchanged int64 `json:"unchanged"`
}
OrgConfigApplyResultCounts is an object the spec declares inline.
type OrgConfigBudget ¶ added in v1.2.0
type OrgConfigBudget struct {
// Key: Stable slug identifying this entity across organizations. Derived
// from the name on export; it is what an apply matches on, so renaming an
// entity while keeping its key is a rename rather than a delete-and-create.
Key string `json:"key"`
Name string `json:"name"`
AmountCents int64 `json:"amountCents"`
Currency *string `json:"currency,omitempty"`
Filters []OrgConfigCostFilter `json:"filters,omitempty"`
Thresholds []OrgConfigBudgetThresholds `json:"thresholds"`
}
OrgConfigBudget is the `OrgConfigBudget` schema.
type OrgConfigBudgetThresholds ¶ added in v1.2.0
type OrgConfigBudgetThresholds struct {
// Type: One of "actual", "forecast".
Type string `json:"type"`
Percent int64 `json:"percent"`
}
OrgConfigBudgetThresholds is an object the spec declares inline.
type OrgConfigChange ¶ added in v1.2.0
type OrgConfigChange struct {
Section OrgConfigSection `json:"section"`
Key string `json:"key"`
Name string `json:"name"`
// Action: One of "create", "update", "delete", "unchanged".
Action string `json:"action"`
// Fields: Fields that differ, on an update.
Fields []string `json:"fields,omitempty"`
}
OrgConfigChange is the `OrgConfigChange` schema.
type OrgConfigCostCentre ¶ added in v1.2.0
type OrgConfigCostCentre struct {
// Key: Stable slug identifying this entity across organizations. Derived
// from the name on export; it is what an apply matches on, so renaming an
// entity while keeping its key is a rename rather than a delete-and-create.
Key string `json:"key"`
Name string `json:"name"`
Description *string `json:"description,omitempty"`
Rules []OrgConfigCostCentreRules `json:"rules,omitempty"`
}
OrgConfigCostCentre is the `OrgConfigCostCentre` schema.
type OrgConfigCostCentreRules ¶ added in v1.2.0
type OrgConfigCostCentreRules struct {
Priority int64 `json:"priority"`
Match *OrgConfigCostCentreRulesMatch `json:"match,omitempty"`
}
OrgConfigCostCentreRules is an object the spec declares inline.
type OrgConfigCostCentreRulesMatch ¶ added in v1.2.0
type OrgConfigCostCentreRulesMatch struct {
TagKey *string `json:"tagKey,omitempty"`
TagValue *string `json:"tagValue,omitempty"`
// Account: Account display name.
Account *string `json:"account,omitempty"`
PluginID *string `json:"pluginId,omitempty"`
Service *string `json:"service,omitempty"`
}
OrgConfigCostCentreRulesMatch is an object the spec declares inline.
type OrgConfigCostFilter ¶ added in v1.2.0
type OrgConfigCostFilter struct {
Dimension string `json:"dimension"`
// Op: One of "in", "not_in".
Op string `json:"op"`
Values []string `json:"values"`
TagKey *string `json:"tagKey,omitempty"`
}
OrgConfigCostFilter is the `OrgConfigCostFilter` schema.
type OrgConfigCustomGraph ¶ added in v1.2.0
type OrgConfigCustomGraph struct {
// Key: Stable slug identifying this entity across organizations. Derived
// from the name on export; it is what an apply matches on, so renaming an
// entity while keeping its key is a rename rather than a delete-and-create.
Key string `json:"key"`
Name string `json:"name"`
Description *string `json:"description,omitempty"`
// Source: The graph's TypeScript source.
Source string `json:"source"`
}
OrgConfigCustomGraph is the `OrgConfigCustomGraph` schema.
type OrgConfigDashboard ¶ added in v1.2.0
type OrgConfigDashboard struct {
// Key: Stable slug identifying this entity across organizations. Derived
// from the name on export; it is what an apply matches on, so renaming an
// entity while keeping its key is a rename rather than a delete-and-create.
Key string `json:"key"`
Name string `json:"name"`
IsDefault *bool `json:"isDefault,omitempty"`
Cards []OrgConfigDashboardCard `json:"cards,omitempty"`
}
OrgConfigDashboard is the `OrgConfigDashboard` schema.
type OrgConfigDashboardCard ¶ added in v1.2.0
type OrgConfigDashboardCard = any
OrgConfigDashboardCard: One card. Position is the index in the dashboard's `cards` array — the grid order all three card kinds share.
type OrgConfigDocument ¶ added in v1.2.0
type OrgConfigDocument struct {
Version *int64 `json:"version,omitempty"`
ExportedAt *string `json:"exportedAt,omitempty"`
ExportedFrom *OrgConfigDocumentExportedFrom `json:"exportedFrom,omitempty"`
Budgets []OrgConfigBudget `json:"budgets,omitempty"`
CustomGraphs []OrgConfigCustomGraph `json:"customGraphs,omitempty"`
Workflows []OrgConfigWorkflow `json:"workflows,omitempty"`
Dashboards []OrgConfigDashboard `json:"dashboards,omitempty"`
MetricAlerts []OrgConfigMetricAlert `json:"metricAlerts,omitempty"`
Probes []OrgConfigProbe `json:"probes,omitempty"`
CostCentres []OrgConfigCostCentre `json:"costCentres,omitempty"`
TagPolicy *OrgConfigDocumentTagPolicy `json:"tagPolicy,omitempty"`
AlertSettings *OrgConfigAlertSettings `json:"alertSettings,omitempty"`
}
OrgConfigDocument: An organization's configuration. Every section is optional — a document that omits one leaves it entirely alone, in both apply modes.
type OrgConfigDocumentExportedFrom ¶ added in v1.2.0
type OrgConfigDocumentExportedFrom struct {
OrganizationID string `json:"organizationId"`
OrganizationName string `json:"organizationName"`
}
OrgConfigDocumentExportedFrom is an object the spec declares inline.
type OrgConfigDocumentTagPolicy ¶ added in v1.2.0
type OrgConfigDocumentTagPolicy struct {
RequiredTags []OrgConfigDocumentTagPolicyRequiredTags `json:"requiredTags"`
EnforceOnCreate bool `json:"enforceOnCreate"`
}
OrgConfigDocumentTagPolicy is an object the spec declares inline.
type OrgConfigDocumentTagPolicyRequiredTags ¶ added in v1.2.0
type OrgConfigDocumentTagPolicyRequiredTags struct {
Key string `json:"key"`
AllowedValues []string `json:"allowedValues,omitempty"`
}
OrgConfigDocumentTagPolicyRequiredTags is an object the spec declares inline.
type OrgConfigMetricAlert ¶ added in v1.2.0
type OrgConfigMetricAlert struct {
// Key: Stable slug identifying this entity across organizations. Derived
// from the name on export; it is what an apply matches on, so renaming an
// entity while keeping its key is a rename rather than a delete-and-create.
Key string `json:"key"`
Name string `json:"name"`
PluginID *string `json:"pluginId,omitempty"`
ResourceTypeID *string `json:"resourceTypeId,omitempty"`
TagKey *string `json:"tagKey,omitempty"`
TagValue *string `json:"tagValue,omitempty"`
MetricKey string `json:"metricKey"`
// Comparator: One of ">", ">=", "<", "<=".
Comparator string `json:"comparator"`
Threshold float64 `json:"threshold"`
ForMinutes *int64 `json:"forMinutes,omitempty"`
CooldownMinutes *int64 `json:"cooldownMinutes,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
}
OrgConfigMetricAlert is the `OrgConfigMetricAlert` schema.
type OrgConfigPlan ¶ added in v1.2.0
type OrgConfigPlan struct {
// Mode: One of "merge", "replace".
Mode string `json:"mode"`
Changes []OrgConfigChange `json:"changes"`
Unresolved []OrgConfigUnresolved `json:"unresolved"`
Counts OrgConfigPlanCounts `json:"counts"`
}
OrgConfigPlan is the `OrgConfigPlan` schema.
type OrgConfigPlanCounts ¶ added in v1.2.0
type OrgConfigPlanCounts struct {
Create int64 `json:"create"`
Update int64 `json:"update"`
Delete int64 `json:"delete"`
Unchanged int64 `json:"unchanged"`
}
OrgConfigPlanCounts is an object the spec declares inline.
type OrgConfigProbe ¶ added in v1.2.0
type OrgConfigProbe struct {
// Key: Stable slug identifying this entity across organizations. Derived
// from the name on export; it is what an apply matches on, so renaming an
// entity while keeping its key is a rename rather than a delete-and-create.
Key string `json:"key"`
Name string `json:"name"`
URL string `json:"url"`
Method *string `json:"method,omitempty"`
IntervalSeconds *int64 `json:"intervalSeconds,omitempty"`
TimeoutMs *int64 `json:"timeoutMs,omitempty"`
FailureThreshold *int64 `json:"failureThreshold,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
}
OrgConfigProbe is the `OrgConfigProbe` schema.
type OrgConfigRequest ¶ added in v1.2.0
type OrgConfigRequest struct {
Document OrgConfigDocument `json:"document"`
// Mode: `merge` creates and updates what the document names and leaves
// everything else alone. `replace` additionally deletes entities the
// document does not name, within the sections it carries.
//
// One of "merge", "replace".
Mode *string `json:"mode,omitempty"`
}
OrgConfigRequest is the `OrgConfigRequest` schema.
type OrgConfigSection ¶ added in v1.2.0
type OrgConfigSection = string
OrgConfigSection is the `OrgConfigSection` schema.
const ( OrgConfigSectionBudgets OrgConfigSection = "budgets" OrgConfigSectionCustomGraphs OrgConfigSection = "customGraphs" OrgConfigSectionWorkflows OrgConfigSection = "workflows" OrgConfigSectionDashboards OrgConfigSection = "dashboards" OrgConfigSectionMetricAlerts OrgConfigSection = "metricAlerts" OrgConfigSectionProbes OrgConfigSection = "probes" OrgConfigSectionCostCentres OrgConfigSection = "costCentres" OrgConfigSectionTagPolicy OrgConfigSection = "tagPolicy" OrgConfigSectionAlertSettings OrgConfigSection = "alertSettings" )
The values OrgConfigSection takes.
type OrgConfigUnresolved ¶ added in v1.2.0
type OrgConfigUnresolved struct {
Section OrgConfigSection `json:"section"`
Key string `json:"key"`
Detail string `json:"detail"`
}
OrgConfigUnresolved: Something the document asked for that this organization could not satisfy — a pin for a resource nobody has synced, an account name that does not exist here. Not fatal: the affected card, clause or deletion is dropped and the rest of the document still applies.
type OrgConfigWorkflow ¶ added in v1.2.0
type OrgConfigWorkflow struct {
// Key: Stable slug identifying this entity across organizations. Derived
// from the name on export; it is what an apply matches on, so renaming an
// entity while keeping its key is a rename rather than a delete-and-create.
Key string `json:"key"`
Name string `json:"name"`
Description *string `json:"description,omitempty"`
// Source: The workflow's TypeScript source.
Source string `json:"source"`
Trigger OrgConfigWorkflowTrigger `json:"trigger,omitempty"`
Metrics []OrgConfigWorkflowMetrics `json:"metrics,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
}
OrgConfigWorkflow: A workflow. The git-webhook signing secret is deliberately absent — it is write-only, so a document can neither leak nor set one.
type OrgConfigWorkflowMetrics ¶ added in v1.2.0
type OrgConfigWorkflowMetrics struct {
Key string `json:"key"`
Label string `json:"label"`
Unit *string `json:"unit,omitempty"`
Type *string `json:"type,omitempty"`
}
OrgConfigWorkflowMetrics is an object the spec declares inline.
type OrgConfigWorkflowTrigger ¶ added in v1.2.0
type OrgConfigWorkflowTrigger = any
OrgConfigWorkflowTrigger is the `OrgConfigWorkflowTrigger` schema.
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 ¶
Organization is the `Organization` schema.
type OrganizationRef ¶ added in v0.8.0
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"`
// UnownedCount: Flagged resources with no recorded owner — the 'nobody to
// ask' count.
UnownedCount int64 `json:"unownedCount"`
// 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"`
Owner *ResourceOwnerAnnotation `json:"owner"`
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
func (n *OrphansNamespace) Get(ctx context.Context, params *OrphansGetParams, opts ...RequestOption) (*OrphanListResponse, error)
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 OwnerCandidate ¶ added in v0.44.0
type OwnerCandidate struct {
UserID string `json:"userId"`
// Name: Display name, falling back to the email.
Name string `json:"name"`
Email string `json:"email"`
}
OwnerCandidate is the `OwnerCandidate` schema.
type OwnerCandidateListResponse ¶ added in v0.44.0
type OwnerCandidateListResponse struct {
Members []OwnerCandidate `json:"members"`
}
OwnerCandidateListResponse is the `OwnerCandidateListResponse` 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 OwnershipDeleteParams ¶ added in v0.44.0
type OwnershipDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ResourceID string
}
OwnershipDeleteParams holds the parameters for `client.ownership.delete`.
type OwnershipGetParams ¶ added in v0.44.0
type OwnershipGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
OwnershipGetParams holds the parameters for `client.ownership.get`.
Every field is optional; pass nil to take the defaults.
type OwnershipMembersParams ¶ added in v0.44.0
type OwnershipMembersParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
OwnershipMembersParams holds the parameters for `client.ownership.members`.
Every field is optional; pass nil to take the defaults.
type OwnershipNamespace ¶ added in v0.44.0
type OwnershipNamespace struct {
// contains filtered or unexported fields
}
OwnershipNamespace is `client.ownership`.
func (*OwnershipNamespace) Delete ¶ added in v0.44.0
func (n *OwnershipNamespace) Delete(ctx context.Context, params OwnershipDeleteParams, opts ...RequestOption) error
Delete: Clear a resource's ownership
Removes the ownership record. The resource itself is untouched.
_Requires permission: `resources:write`._
DELETE /api/org/{orgId}/ownership
Raises on 400: Bad request
Raises on 404: Not found
func (*OwnershipNamespace) Get ¶ added in v0.44.0
func (n *OwnershipNamespace) Get(ctx context.Context, params *OwnershipGetParams, opts ...RequestOption) (*ResourceOwnershipListResponse, error)
Get: List resource ownership records
Every ownership record in the organization — owner, purpose and authorizing ticket, per resource. Only resources somebody has recorded something about appear; an absent record means the resource is unowned.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/ownership
func (*OwnershipNamespace) Members ¶ added in v0.44.0
func (n *OwnershipNamespace) Members(ctx context.Context, params *OwnershipMembersParams, opts ...RequestOption) (*OwnerCandidateListResponse, error)
Members: List people an owner can be set to
Org members, as a minimal id/name/email projection for the owner picker. Requires only `resources:read`, deliberately not `team:read`: recording who owns a resource must not be reserved for whoever can also read roles and membership.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/ownership/members
func (*OwnershipNamespace) Resource ¶ added in v0.44.0
func (n *OwnershipNamespace) Resource(ctx context.Context, params OwnershipResourceParams, opts ...RequestOption) (*ResourceOwnershipEnvelope, error)
Resource: Get one resource's ownership
The ownership record for a single resource, or null when none is recorded.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/ownership/resource
Raises on 400: Bad request
func (*OwnershipNamespace) Update ¶ added in v0.44.0
func (n *OwnershipNamespace) Update(ctx context.Context, params *OwnershipUpdateParams, opts ...RequestOption) (any, error)
Update: Set a resource's ownership
Upsert keyed by `resourceId` — ownership is a property of the resource, so there is no separate create and update. Omitted fields keep their value and `null` clears one. Clearing every field removes the record entirely and the response is `null`, which is the new truth rather than an empty record. An `ownerUserId` must be a member of this organization: ownership that looks routable but reaches nobody is worse than none.
_Requires permission: `resources:write`._
PUT /api/org/{orgId}/ownership
Raises on 400: Bad request
Raises on 404: Not found
type OwnershipResourceParams ¶ added in v0.44.0
type OwnershipResourceParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ResourceID string
}
OwnershipResourceParams holds the parameters for `client.ownership.resource`.
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 OwnershipUpdateParams ¶ added in v0.44.0
type OwnershipUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *ResourceOwnershipPatch
}
OwnershipUpdateParams holds the parameters for `client.ownership.update`.
Every field is optional; pass nil to take the defaults.
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
func (n *PagesNamespace) Delete(ctx context.Context, params PagesDeleteParams, opts ...RequestOption) (*PageClearResponse, error)
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" PermissionConfigRead Permission = "config:read" PermissionConfigWrite Permission = "config:write" PermissionAuditRead Permission = "audit:read" PermissionAccessRead Permission = "access:read" PermissionAccessRequest Permission = "access:request" PermissionAccessApprove Permission = "access:approve" 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" PermissionSessionRecordingsRead Permission = "session-recordings:read" PermissionSessionRecordingsWrite Permission = "session-recordings:write" PermissionBastionsRead Permission = "bastions:read" PermissionBastionsWrite Permission = "bastions:write" PermissionChatRead Permission = "chat:read" PermissionChatWrite Permission = "chat:write" PermissionJiraRead Permission = "jira:read" PermissionJiraWrite Permission = "jira:write" PermissionLinearRead Permission = "linear:read" PermissionLinearWrite Permission = "linear: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" PluginIDUploadthing PluginID = "uploadthing" PluginIDVercel PluginID = "vercel" PluginIDWorkos PluginID = "workos" 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 ¶ added in v0.30.0
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 PostureAlertSettings ¶ added in v0.33.0
type PostureAlertSettings struct {
// Enabled: Whether the poller sends posture alerts for this organization at
// all.
Enabled bool `json:"enabled"`
// LastNotifiedAt: When the organization's posture 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"`
}
PostureAlertSettings is the `PostureAlertSettings` schema.
type PostureAlertSettingsUpdate ¶ added in v0.33.0
type PostureAlertSettingsUpdate struct {
Enabled *bool `json:"enabled,omitempty"`
}
PostureAlertSettingsUpdate is the `PostureAlertSettingsUpdate` schema.
type PostureDismissal ¶ added in v0.43.0
type PostureDismissal struct {
ResourceID string `json:"resourceId"`
RuleID string `json:"ruleId"`
// DismissedAt: When the finding was accepted.
DismissedAt string `json:"dismissedAt"`
// DismissedBy: Display name or email of whoever accepted it; null when
// unknown.
DismissedBy *string `json:"dismissedBy"`
// Reason: The operator's note, when they left one.
Reason *string `json:"reason"`
}
PostureDismissal is the `PostureDismissal` schema.
type PostureDismissalCreate ¶ added in v0.43.0
type PostureDismissalCreate struct {
// ResourceID: Infrawrench resource id the finding is on.
ResourceID string `json:"resourceId"`
// RuleID: The matched rule's id.
RuleID string `json:"ruleId"`
// Reason: Why this finding is acceptable. Trimmed; an empty note is stored
// as none.
Reason *string `json:"reason,omitempty"`
}
PostureDismissalCreate is the `PostureDismissalCreate` schema.
type PostureDismissalsCreateParams ¶ added in v0.43.0
type PostureDismissalsCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *PostureDismissalCreate
}
PostureDismissalsCreateParams holds the parameters for `client.posture.dismissals.create`.
Every field is optional; pass nil to take the defaults.
type PostureDismissalsDeleteParams ¶ added in v0.43.0
type PostureDismissalsDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// ResourceID: Infrawrench resource id the finding is on.
ResourceID string
// RuleID: The matched rule's id.
RuleID string
}
PostureDismissalsDeleteParams holds the parameters for `client.posture.dismissals.delete`.
type PostureDismissalsNamespace ¶ added in v0.43.0
type PostureDismissalsNamespace struct {
// contains filtered or unexported fields
}
PostureDismissalsNamespace is `client.posture.dismissals`.
func (*PostureDismissalsNamespace) Create ¶ added in v0.43.0
func (n *PostureDismissalsNamespace) Create(ctx context.Context, params *PostureDismissalsCreateParams, opts ...RequestOption) (*PostureDismissal, error)
Create: Dismiss a posture finding
Accept a finding — the bucket really is meant to be public, the key really is rotated out of band. The finding leaves `findings` and stops feeding the daily posture alerts, but the rule keeps being evaluated and the finding is reported back under `dismissed` for as long as it still matches. Idempotent: dismissing an already-dismissed finding rewrites the note and the author.
_Requires permission: `resources:write`._
POST /api/org/{orgId}/posture/dismissals
Raises on 400: Bad request
func (*PostureDismissalsNamespace) Delete ¶ added in v0.43.0
func (n *PostureDismissalsNamespace) Delete(ctx context.Context, params PostureDismissalsDeleteParams, opts ...RequestOption) error
Delete: Restore a dismissed posture finding
Undo a dismissal, putting the finding back on the list and back into the alert feed. The finding is identified by query parameters rather than path segments because resource ids are provider-native and routinely contain slashes.
_Requires permission: `resources:write`._
DELETE /api/org/{orgId}/posture/dismissals
Raises on 400: Bad request
Raises on 404: Not found
type PostureFinding ¶ added in v0.33.0
type PostureFinding 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"`
// RuleID: The matched rule's stable id, unique within the plugin.
RuleID string `json:"ruleId"`
// Title: Short rule title.
Title string `json:"title"`
// Severity: How bad the finding is. `critical` and `high` findings feed the
// posture alerts; `medium` and `low` are hygiene work surfaced on the
// posture screen only.
//
// One of "critical", "high", "medium", "low".
Severity string `json:"severity"`
// Category: Grouping bucket for what kind of exposure the finding describes.
//
// One of "public-exposure", "encryption", "credential-age",
// "data-protection", "other".
Category string `json:"category"`
// Reason: Plugin-authored explanation of why this is a finding.
Reason string `json:"reason"`
}
PostureFinding is the `PostureFinding` schema.
type PostureGetParams ¶ added in v0.33.0
type PostureGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
PostureGetParams holds the parameters for `client.posture.get`.
Every field is optional; pass nil to take the defaults.
type PostureListResponse ¶ added in v0.33.0
type PostureListResponse struct {
// Findings: Live findings, worst severity first. Dismissed findings are not
// included.
Findings []PostureFinding `json:"findings"`
// TotalCount: Live finding count; dismissals excluded.
TotalCount int64 `json:"totalCount"`
Counts PostureSeverityCounts `json:"counts"`
// Dismissed: Findings a dismissal is currently suppressing, most recently
// dismissed first. Only dismissals whose rule still matches appear, so a
// finding that has since been fixed simply drops out.
Dismissed []DismissedPostureFinding `json:"dismissed"`
DismissedCount int64 `json:"dismissedCount"`
GeneratedAt string `json:"generatedAt"`
}
PostureListResponse is the `PostureListResponse` schema.
type PostureNamespace ¶ added in v0.33.0
type PostureNamespace struct {
// Dismissals: `client.posture.dismissals`.
Dismissals *PostureDismissalsNamespace
// Settings: `client.posture.settings`.
Settings *PostureSettingsNamespace
// contains filtered or unexported fields
}
PostureNamespace is `client.posture`.
func (*PostureNamespace) Get ¶ added in v0.33.0
func (n *PostureNamespace) Get(ctx context.Context, params *PostureGetParams, opts ...RequestOption) (*PostureListResponse, error)
Get: List security posture findings on synced resources
Plugin-declared security checks evaluated over already-synced resource state: public buckets, 0.0.0.0/0 ingress rules, unencrypted disks, publicly reachable database endpoints, stale credentials, missing deletion/backup protection. No provider API calls are made and results reflect the last sync. Findings are sorted worst severity first, with per-severity counts. Findings the organization has dismissed are reported separately under `dismissed` and are excluded from `findings`, `counts` and the posture alerts.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/posture
type PostureSettingsGetParams ¶ added in v0.33.0
type PostureSettingsGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
PostureSettingsGetParams holds the parameters for `client.posture.settings.get`.
Every field is optional; pass nil to take the defaults.
type PostureSettingsNamespace ¶ added in v0.33.0
type PostureSettingsNamespace struct {
// contains filtered or unexported fields
}
PostureSettingsNamespace is `client.posture.settings`.
func (*PostureSettingsNamespace) Get ¶ added in v0.33.0
func (n *PostureSettingsNamespace) Get(ctx context.Context, params *PostureSettingsGetParams, opts ...RequestOption) (*PostureAlertSettings, error)
Get: Get the organization's posture alert settings
Whether the poller's daily posture alert scan is enabled. An organization that never saved reads the shipped defaults (enabled).
_Requires permission: `org:settings:write`._
GET /api/org/{orgId}/posture/settings
func (*PostureSettingsNamespace) Update ¶ added in v0.33.0
func (n *PostureSettingsNamespace) Update(ctx context.Context, params *PostureSettingsUpdateParams, opts ...RequestOption) (*PostureAlertSettings, error)
Update: Update the posture alert settings
Saving never resets the alert cooldown.
_Requires permission: `org:settings:write`._
PUT /api/org/{orgId}/posture/settings
Raises on 400: Bad request
type PostureSettingsUpdateParams ¶ added in v0.33.0
type PostureSettingsUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *PostureAlertSettingsUpdate
}
PostureSettingsUpdateParams holds the parameters for `client.posture.settings.update`.
Every field is optional; pass nil to take the defaults.
type PostureSeverityCounts ¶ added in v0.33.0
type PostureSeverityCounts struct {
Critical int64 `json:"critical"`
High int64 `json:"high"`
Medium int64 `json:"medium"`
Low int64 `json:"low"`
}
PostureSeverityCounts: Live finding count per severity; every bucket present, zeros included.
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 ¶ added in v0.30.0
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 ProbeMetricSeries ¶ added in v0.33.0
type ProbeMetricSeries struct {
// Label: "Latency" (ms) or "Up" (1/0).
Label string `json:"label"`
Unit *string `json:"unit,omitempty"`
Points []ProbeMetricSeriesPoints `json:"points"`
}
ProbeMetricSeries is the `ProbeMetricSeries` schema.
type ProbeMetricSeriesPoints ¶ added in v0.33.0
type ProbeMetricSeriesPoints struct {
// Timestamp: Unix epoch milliseconds.
Timestamp float64 `json:"timestamp"`
Value float64 `json:"value"`
}
ProbeMetricSeriesPoints is an object the spec declares inline.
type ProbeMetrics ¶ added in v0.33.0
type ProbeMetrics struct {
Series []ProbeMetricSeries `json:"series"`
}
ProbeMetrics is the `ProbeMetrics` 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 ProbeSuggestion ¶ added in v0.33.0
type ProbeSuggestion struct {
// URL: Normalized to an absolute URL — bare hosts get https://.
URL string `json:"url"`
ResourceID string `json:"resourceId"`
DisplayName string `json:"displayName"`
PluginID PluginID `json:"pluginId"`
ResourceTypeID string `json:"resourceTypeId"`
AccountID string `json:"accountId"`
// OutputKey: The output/field key the URL was mined from.
OutputKey string `json:"outputKey"`
}
ProbeSuggestion is the `ProbeSuggestion` schema.
type ProbeSuggestions ¶ added in v0.33.0
type ProbeSuggestions struct {
Suggestions []ProbeSuggestion `json:"suggestions"`
}
ProbeSuggestions is the `ProbeSuggestions` schema.
type ProbesCreateParams ¶ added in v0.33.0
type ProbesCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *SyntheticProbeCreate
}
ProbesCreateParams holds the parameters for `client.probes.create`.
Every field is optional; pass nil to take the defaults.
type ProbesDeleteParams ¶ added in v0.33.0
type ProbesDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ProbeID string
}
ProbesDeleteParams holds the parameters for `client.probes.delete`.
type ProbesGetParams ¶ added in v0.33.0
type ProbesGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
ProbesGetParams holds the parameters for `client.probes.get`.
Every field is optional; pass nil to take the defaults.
type ProbesMetricsParams ¶ added in v0.33.0
type ProbesMetricsParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ProbeID string
// StartMs: Range start, Unix epoch ms.
StartMs *string
// EndMs: Range end, Unix epoch ms.
EndMs *string
}
ProbesMetricsParams holds the parameters for `client.probes.metrics`.
type ProbesNamespace ¶ added in v0.33.0
type ProbesNamespace struct {
// contains filtered or unexported fields
}
ProbesNamespace is `client.probes`.
func (*ProbesNamespace) Create ¶ added in v0.33.0
func (n *ProbesNamespace) Create(ctx context.Context, params *ProbesCreateParams, opts ...RequestOption) (*SyntheticProbe, error)
Create: Create a probe
Point an uptime/latency check at an endpoint. Numeric inputs are clamped into their allowed ranges rather than rejected; the first check runs within one poller tick. Audit-logged.
_Requires permission: `resources:write`._
POST /api/org/{orgId}/probes
Raises on 400: Bad request
Raises on 404: Not found
func (*ProbesNamespace) Delete ¶ added in v0.33.0
func (n *ProbesNamespace) Delete(ctx context.Context, params ProbesDeleteParams, opts ...RequestOption) error
Delete: Delete a probe
Remove the probe. Recorded series age out of the metric store. Audit-logged.
_Requires permission: `resources:write`._
DELETE /api/org/{orgId}/probes/{probeId}
Raises on 404: Not found
func (*ProbesNamespace) Get ¶ added in v0.33.0
func (n *ProbesNamespace) Get(ctx context.Context, params *ProbesGetParams, opts ...RequestOption) (*SyntheticProbeList, error)
Get: List synthetic probes
Every probe in the organization with its live status, consecutive-failure count, last latency and trailing-24h uptime. Probes run on an interval from an edge proxy outside the cluster, so results reflect what an internet client would see.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/probes
func (*ProbesNamespace) Metrics ¶ added in v0.33.0
func (n *ProbesNamespace) Metrics(ctx context.Context, params ProbesMetricsParams, opts ...RequestOption) (*ProbeMetrics, error)
Metrics: Read a probe's recorded series
The "Latency" (ms) and "Up" (1/0) series over a time range, from the shared metric store. Resolution auto-selects raw/1-minute/1-hour rollups by span. Defaults to the trailing 24 hours.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/probes/{probeId}/metrics
Raises on 400: Bad request
Raises on 404: Not found
Raises on 503: A backing service this endpoint depends on is not available
func (*ProbesNamespace) Suggestions ¶ added in v0.33.0
func (n *ProbesNamespace) Suggestions(ctx context.Context, params *ProbesSuggestionsParams, opts ...RequestOption) (*ProbeSuggestions, error)
Suggestions: Suggest endpoints from synced resources
Endpoint candidates mined from the organization's synced resource outputs and fields (keys like url, endpoint, host, domain, publicIp). A cheap read over stored state — no provider API calls. Deduplicated by URL.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/probes/suggestions
func (*ProbesNamespace) Update ¶ added in v0.33.0
func (n *ProbesNamespace) Update(ctx context.Context, params ProbesUpdateParams, opts ...RequestOption) (*SyntheticProbe, error)
Update: Update or disable a probe
Edit settings and/or toggle `enabled`. Changing the URL or method resets the probe's state to `unknown` — the history belongs to the old endpoint. Audit-logged.
_Requires permission: `resources:write`._
PUT /api/org/{orgId}/probes/{probeId}
Raises on 400: Bad request
Raises on 404: Not found
type ProbesSuggestionsParams ¶ added in v0.33.0
type ProbesSuggestionsParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
ProbesSuggestionsParams holds the parameters for `client.probes.suggestions`.
Every field is optional; pass nil to take the defaults.
type ProbesUpdateParams ¶ added in v0.33.0
type ProbesUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ProbeID string
// Body: the JSON request body.
Body *SyntheticProbeUpdate
}
ProbesUpdateParams holds the parameters for `client.probes.update`.
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 ¶
func (n *ProfileEmailChangeNamespace) Confirm(ctx context.Context, params *ProfileEmailChangeConfirmParams, opts ...RequestOption) (*ProfileEmailChangeConfirmResponse, error)
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 ¶
func (n *ProfileEmailChangeNamespace) Create(ctx context.Context, params *ProfileEmailChangeCreateParams, opts ...RequestOption) (*ProfileEmailChangeCreateResponse, error)
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 ¶
func (n *ProfileMFANamespace) Challenge(ctx context.Context, params ProfileMFAChallengeParams, opts ...RequestOption) (*ProfileMfachallengeResponse, error)
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 ¶
func (n *ProfileMFANamespace) Create(ctx context.Context, opts ...RequestOption) (*TOTPEnrollment, error)
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 ¶
func (n *ProfileMFANamespace) Verify(ctx context.Context, params ProfileMFAVerifyParams, opts ...RequestOption) (*ProfileMfaverifyResponse, error)
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 ¶
func (n *ProfileNamespace) PasswordReset(ctx context.Context, opts ...RequestOption) (*ProfilePasswordResetResponse, error)
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 ¶
func (n *ProfileNamespace) Update(ctx context.Context, params *ProfileUpdateParams, opts ...RequestOption) (*ProfileSummary, error)
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 ¶
func (n *ProfileSessionsNamespace) Delete(ctx context.Context, params ProfileSessionsDeleteParams, opts ...RequestOption) (*OK, error)
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 ¶
func (n *ProfileSessionsNamespace) List(ctx context.Context, opts ...RequestOption) ([]UserSession, error)
List: List the signed-in user's active sessions
GET /api/profile/sessions
Raises on 401: Unauthenticated
func (*ProfileSessionsNamespace) RevokeOthers ¶
func (n *ProfileSessionsNamespace) RevokeOthers(ctx context.Context, opts ...RequestOption) (*ProfileSessionsRevokeOthersResponse, error)
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 PublicStatusComponent ¶ added in v0.44.0
type PublicStatusComponent struct {
// ID: Stable per page. Deliberately not the probe id.
ID string `json:"id"`
Name string `json:"name"`
GroupName *string `json:"groupName"`
// State: A component's public state. A paused probe reads `unknown`
// regardless of its last result — the page is a claim about what is being
// checked now.
//
// One of "operational", "degraded", "down", "unknown".
State string `json:"state"`
Uptime24h *float64 `json:"uptime24h"`
// History: Oldest first; empty when history is hidden.
History []StatusHistoryDay `json:"history"`
}
PublicStatusComponent is the `PublicStatusComponent` schema.
type PublicStatusPage ¶ added in v0.44.0
type PublicStatusPage struct {
Title string `json:"title"`
Description *string `json:"description"`
// State: Rollup over the components. `degraded` means some but not all are
// down; components with no data are ignored rather than dragging the page to
// unknown.
//
// One of "operational", "degraded", "major_outage", "unknown".
State string `json:"state"`
// Summary: One sentence describing `state`.
Summary string `json:"summary"`
Components []PublicStatusComponent `json:"components"`
SupportURL *string `json:"supportUrl"`
ShowHistory bool `json:"showHistory"`
ShowUptime bool `json:"showUptime"`
HistoryDays int64 `json:"historyDays"`
GeneratedAt string `json:"generatedAt"`
}
PublicStatusPage is the `PublicStatusPage` schema.
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 QuietHours ¶ added in v1.0.0
type QuietHours struct {
// Timezone: IANA zone, e.g. Europe/Berlin
Timezone string `json:"timezone"`
StartMinute int64 `json:"startMinute"`
// EndMinute: May be less than startMinute for an overnight window. Equal
// means empty.
EndMinute int64 `json:"endMinute"`
// Days: ISO weekdays the window applies on, matched against the day the
// window opened. Empty means every day.
Days []int64 `json:"days"`
UrgentOverride *AlertSeverity `json:"urgentOverride"`
}
QuietHours: A recurring local-time window during which the rule holds its alerts. Held, not dropped — a held alert is queued and delivered when the window closes.
The API may send null in its place.
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 ReportDeliveryTargetOption ¶ added in v1.6.0
type ReportDeliveryTargetOption struct {
// ID: The stored row id — what the schedule input carries.
ID string `json:"id"`
// Label: Display label: `#channel` for Slack, the saved label for Teams.
Label string `json:"label"`
}
ReportDeliveryTargetOption is the `ReportDeliveryTargetOption` schema.
type ReportDeliveryTargets ¶ added in v1.6.0
type ReportDeliveryTargets struct {
SlackChannels []ReportDeliveryTargetOption `json:"slackChannels"`
TeamsWebhooks []ReportDeliveryTargetOption `json:"teamsWebhooks"`
// EmailAvailable: Whether this deployment can send mail at all. Addresses
// can be saved regardless, but they deliver nowhere until a mail provider is
// configured.
EmailAvailable bool `json:"emailAvailable"`
}
ReportDeliveryTargets is the `ReportDeliveryTargets` schema.
type ReportNotification ¶ added in v1.6.0
type ReportNotification struct {
ID string `json:"id"`
CostReportID string `json:"costReportId"`
// Cadence: How often the schedule fires. The report itself decides what
// window it charts.
//
// One of "daily", "weekly", "monthly".
Cadence string `json:"cadence"`
SendDay int64 `json:"sendDay"`
SendDayOfMonth int64 `json:"sendDayOfMonth"`
Hour int64 `json:"hour"`
Timezone string `json:"timezone"`
SlackChannelIDs []string `json:"slackChannelIds"`
TeamsWebhookIDs []string `json:"teamsWebhookIds"`
EmailRecipients []string `json:"emailRecipients"`
Enabled bool `json:"enabled"`
// NextSendAt: When the next scheduled send is due; null while disabled.
NextSendAt *string `json:"nextSendAt"`
// LastSentAt: When a delivery last actually reached at least one
// destination.
LastSentAt *string `json:"lastSentAt"`
// LastStatus: What the last attempt did. `partial` means some destinations
// took it and some failed — never retried automatically, because a retry
// would double-post where it landed.
//
// One of "pending", "succeeded", "partial", "failed", "no_targets".
LastStatus *string `json:"lastStatus"`
LastError *string `json:"lastError"`
CreatedByUserID *string `json:"createdByUserId"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
ReportNotification is the `ReportNotification` schema.
type ReportNotificationInput ¶ added in v1.6.0
type ReportNotificationInput struct {
// Cadence: How often the schedule fires. The report itself decides what
// window it charts.
//
// One of "daily", "weekly", "monthly".
Cadence string `json:"cadence"`
// SendDay: ISO day of week (1 = Monday … 7 = Sunday); read only when cadence
// is weekly.
SendDay *int64 `json:"sendDay,omitempty"`
// SendDayOfMonth: Day of month; read only when cadence is monthly. A day the
// month doesn't have clamps to its last day, so 31 means month end
// everywhere.
SendDayOfMonth *int64 `json:"sendDayOfMonth,omitempty"`
// Hour: Local hour in `timezone` the delivery fires at.
Hour int64 `json:"hour"`
// Timezone: IANA zone, e.g. `Europe/Berlin`. Validated server-side.
Timezone string `json:"timezone"`
// SlackChannelIDs: Stored Slack channel row ids (from the targets endpoint)
// to post to.
SlackChannelIDs []string `json:"slackChannelIds"`
// TeamsWebhookIDs: Stored Teams webhook row ids (from the targets endpoint)
// to post to.
TeamsWebhookIDs []string `json:"teamsWebhookIds"`
// EmailRecipients: Email addresses; normalized (lowercased) server-side. At
// most 20.
EmailRecipients []string `json:"emailRecipients"`
Enabled bool `json:"enabled"`
}
ReportNotificationInput: A full replace, like a report's own PUT. At least one destination is required — a schedule with nowhere to deliver would only ever record failures.
type ReportNotificationSendResult ¶ added in v1.6.0
type ReportNotificationSendResult struct {
Attempted int64 `json:"attempted"`
Succeeded int64 `json:"succeeded"`
Slack ReportNotificationSendResultSlack `json:"slack"`
Teams ReportNotificationSendResultTeams `json:"teams"`
Email ReportNotificationSendResultEmail `json:"email"`
}
ReportNotificationSendResult is the `ReportNotificationSendResult` schema.
type ReportNotificationSendResultEmail ¶ added in v1.6.0
type ReportNotificationSendResultEmail struct {
Attempted int64 `json:"attempted"`
Succeeded int64 `json:"succeeded"`
}
ReportNotificationSendResultEmail is an object the spec declares inline.
type ReportNotificationSendResultSlack ¶ added in v1.6.0
type ReportNotificationSendResultSlack struct {
Attempted int64 `json:"attempted"`
Succeeded int64 `json:"succeeded"`
}
ReportNotificationSendResultSlack is an object the spec declares inline.
type ReportNotificationSendResultTeams ¶ added in v1.6.0
type ReportNotificationSendResultTeams struct {
Attempted int64 `json:"attempted"`
Succeeded int64 `json:"succeeded"`
}
ReportNotificationSendResultTeams 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"`
SupportsTerraformExport bool `json:"supportsTerraformExport"`
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 ResourceLease ¶ added in v0.33.0
type ResourceLease struct {
ID string `json:"id"`
// ResourceID: Infrawrench resource id the lease is attached to.
ResourceID string `json:"resourceId"`
AccountID string `json:"accountId"`
PluginID PluginID `json:"pluginId"`
ResourceTypeID string `json:"resourceTypeId"`
// ResourceName: Resource display name (denormalized at lease time, so it
// survives deletion).
ResourceName string `json:"resourceName"`
AccountName string `json:"accountName"`
// ExpiresAt: The lease deadline.
ExpiresAt string `json:"expiresAt"`
// AutoDelete: Whether the resource is deleted at expiry. Auto-delete is
// announced twice before it fires and deferred while an org change freeze is
// in effect.
AutoDelete bool `json:"autoDelete"`
// Note: Why/who-for; shown on the expiry radar.
Note *string `json:"note"`
// Status: Lease lifecycle: `active` (counting down), `deleted` (auto-delete
// completed), `failed` (auto-delete was retried and given up on — see
// `lastError`), or `canceled` (called off; the resource stays).
//
// One of "active", "deleted", "failed", "canceled".
Status string `json:"status"`
// FirstWarningAt: When the first auto-delete announcement went out; null
// until sent.
FirstWarningAt *string `json:"firstWarningAt"`
// FinalWarningAt: When the final auto-delete announcement went out; null
// until sent.
FinalWarningAt *string `json:"finalWarningAt"`
DeleteAttempts int64 `json:"deleteAttempts"`
// LastError: Last auto-delete failure or freeze-deferral detail; never
// silent.
LastError *string `json:"lastError"`
// CompletedAt: When the lease reached a terminal status.
CompletedAt *string `json:"completedAt"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
ResourceLease is the `ResourceLease` schema.
type ResourceLeaseCreate ¶ added in v0.33.0
type ResourceLeaseCreate struct {
ResourceID string `json:"resourceId"`
AccountID string `json:"accountId"`
// ExpiresAt: Must be in the future, at most 365 days out.
ExpiresAt string `json:"expiresAt"`
// AutoDelete: Requires the `resources:delete` permission when true.
AutoDelete *bool `json:"autoDelete,omitempty"`
Note *string `json:"note,omitempty"`
}
ResourceLeaseCreate is the `ResourceLeaseCreate` schema.
type ResourceLeaseList ¶ added in v0.33.0
type ResourceLeaseList struct {
Leases []ResourceLease `json:"leases"`
}
ResourceLeaseList is the `ResourceLeaseList` schema.
type ResourceLeaseLookup ¶ added in v0.33.0
type ResourceLeaseLookup struct {
Lease any `json:"lease"`
}
ResourceLeaseLookup is the `ResourceLeaseLookup` schema.
type ResourceLeaseUpdate ¶ added in v0.33.0
type ResourceLeaseUpdate struct {
ExpiresAt *string `json:"expiresAt,omitempty"`
// AutoDelete: Requires the `resources:delete` permission when set to true.
AutoDelete *bool `json:"autoDelete,omitempty"`
// Note: `null` clears the note.
Note *string `json:"note,omitempty"`
}
ResourceLeaseUpdate is the `ResourceLeaseUpdate` schema.
type ResourceOwnerAnnotation ¶ added in v0.44.0
type ResourceOwnerAnnotation struct {
// UserID: Set when a routable org member owns it.
UserID *string `json:"userId"`
// DisplayName: The member's name, or the free-text owner.
DisplayName string `json:"displayName"`
// IsLabel: True when the owner is free text — nothing can be routed to it.
IsLabel bool `json:"isLabel"`
TicketURL *string `json:"ticketUrl"`
Purpose *string `json:"purpose"`
}
ResourceOwnerAnnotation: Who owns this resource, or null when nobody has claimed it. Present only when the owner can be named: a resource carrying a purpose but no owner reads as null, because the question this answers is who to tell.
The API may send null in its place.
type ResourceOwnership ¶ added in v0.44.0
type ResourceOwnership struct {
ID string `json:"id"`
ResourceID string `json:"resourceId"`
AccountID string `json:"accountId"`
PluginID PluginID `json:"pluginId"`
ResourceTypeID string `json:"resourceTypeId"`
// ResourceName: Resource display name, denormalized so a report can name a
// deleted resource.
ResourceName string `json:"resourceName"`
// OwnerUserID: The routable owner — an org member. Alerts about this
// resource reach them.
OwnerUserID *string `json:"ownerUserId"`
// OwnerName: Resolved server-side; null when unset or removed.
OwnerName *string `json:"ownerName"`
OwnerEmail *string `json:"ownerEmail"`
// OwnerLabel: Free-text owner (a team, a rota, a contractor). Display-only,
// never routed.
OwnerLabel *string `json:"ownerLabel"`
// Purpose: What this resource is for.
Purpose *string `json:"purpose"`
// TicketURL: Link to the ticket that authorized it.
TicketURL *string `json:"ticketUrl"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
ResourceOwnership is the `ResourceOwnership` schema.
type ResourceOwnershipEnvelope ¶ added in v0.44.0
type ResourceOwnershipEnvelope struct {
Ownership any `json:"ownership"`
}
ResourceOwnershipEnvelope is the `ResourceOwnershipEnvelope` schema.
type ResourceOwnershipListResponse ¶ added in v0.44.0
type ResourceOwnershipListResponse struct {
Ownership []ResourceOwnership `json:"ownership"`
}
ResourceOwnershipListResponse is the `ResourceOwnershipListResponse` schema.
type ResourceOwnershipPatch ¶ added in v0.44.0
type ResourceOwnershipPatch struct {
ResourceID string `json:"resourceId"`
// OwnerUserID: Omit to keep, null to clear.
OwnerUserID *string `json:"ownerUserId,omitempty"`
// OwnerLabel: Omit to keep, null to clear.
OwnerLabel *string `json:"ownerLabel,omitempty"`
// Purpose: Omit to keep, null to clear.
Purpose *string `json:"purpose,omitempty"`
// TicketURL: Omit to keep, null to clear.
TicketURL *string `json:"ticketUrl,omitempty"`
}
ResourceOwnershipPatch is the `ResourceOwnershipPatch` schema.
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" ResourceTypeIDConnection ResourceTypeID = "connection" 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" ResourceTypeIDDirectory ResourceTypeID = "directory" ResourceTypeIDDirectoryGroup ResourceTypeID = "directory-group" ResourceTypeIDDirectoryUser ResourceTypeID = "directory-user" 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" ResourceTypeIDInvitation ResourceTypeID = "invitation" 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" ResourceTypeIDNotificationPolicy ResourceTypeID = "notification-policy" ResourceTypeIDObjectStorageBucket ResourceTypeID = "object-storage-bucket" ResourceTypeIDOpensearchCluster ResourceTypeID = "opensearch-cluster" ResourceTypeIDOpensearchDomain ResourceTypeID = "opensearch-domain" ResourceTypeIDOrganization ResourceTypeID = "organization" ResourceTypeIDOrganizationMembership ResourceTypeID = "organization-membership" 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" ResourceTypeIDRole ResourceTypeID = "role" 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" ResourceTypeIDUser ResourceTypeID = "user" ResourceTypeIDUtApp ResourceTypeID = "ut-app" ResourceTypeIDUtFile ResourceTypeID = "ut-file" 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" ResourceTypeIDWebhookEndpoint ResourceTypeID = "webhook-endpoint" 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"`
ShowInSidebar *bool `json:"showInSidebar,omitempty"`
AccountRoot *bool `json:"accountRoot,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 ResourcesCostEstimateParams ¶ added in v0.43.0
type ResourcesCostEstimateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body CostEstimateRequest
}
ResourcesCostEstimateParams holds the parameters for `client.resources.costEstimate`.
type ResourcesCostEstimateResponse ¶ added in v0.43.0
type ResourcesCostEstimateResponse struct {
Estimate *CostEstimate `json:"estimate"`
}
ResourcesCostEstimateResponse is an object the spec declares inline.
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 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 ResourcesExportTerraformParams ¶ added in v1.3.0
type ResourcesExportTerraformParams 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 ExportTerraformRequest
}
ResourcesExportTerraformParams holds the parameters for `client.resources.exportTerraform`.
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 ¶
func (n *ResourcesManifestNamespace) Create(ctx context.Context, params ResourcesManifestCreateParams, opts ...RequestOption) (*OK, error)
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 ¶
func (n *ResourcesManifestNamespace) Get(ctx context.Context, params ResourcesManifestGetParams, opts ...RequestOption) (*Manifest, error)
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) CostEstimate ¶ added in v0.43.0
func (n *ResourcesNamespace) CostEstimate(ctx context.Context, params ResourcesCostEstimateParams, opts ...RequestOption) (*ResourcesCostEstimateResponse, error)
CostEstimate: Estimated monthly cost of a configuration
Calls the plugin's `estimateCost` and returns a monthly total with the line items behind it. Price a proposed resource by passing `fields`, an existing one by passing `resourceId`, or a proposed change to an existing one by passing both — `fields` is merged over the resource's stored fields, so the caller only sends what changed. `estimate` is null when the plugin cannot price the configuration; that is not the same as an estimate of zero, and it should not be rendered as one.
_Requires permission: `resources:read`._
POST /api/org/{orgId}/resources/cost-estimate
Raises on 404: Not found
func (*ResourcesNamespace) Create ¶
func (n *ResourcesNamespace) Create(ctx context.Context, params ResourcesCreateParams, opts ...RequestOption) (*CreateResourceResponse, error)
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 ¶
func (n *ResourcesNamespace) CreateConfig(ctx context.Context, params ResourcesCreateConfigParams, opts ...RequestOption) (JSONObject, error)
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) CreatePricing ¶
func (n *ResourcesNamespace) CreatePricing(ctx context.Context, params ResourcesCreatePricingParams, opts ...RequestOption) (map[string]JSONObject, error)
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 ¶
func (n *ResourcesNamespace) Describe(ctx context.Context, params ResourcesDescribeParams, opts ...RequestOption) (*DescribeResponse, error)
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 ¶
func (n *ResourcesNamespace) Detail(ctx context.Context, params ResourcesDetailParams, opts ...RequestOption) (*ResourceDetail, error)
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 ¶
func (n *ResourcesNamespace) ExportCredential(ctx context.Context, params ResourcesExportCredentialParams, opts ...RequestOption) (*CredentialExport, error)
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) ExportTerraform ¶ added in v1.3.0
func (n *ResourcesNamespace) ExportTerraform(ctx context.Context, params ResourcesExportTerraformParams, opts ...RequestOption) (*TerraformExport, error)
ExportTerraform: Generate Terraform HCL for a resource (and its direct children) from stored state
_Requires permission: `resources:read`._
POST /api/org/{orgId}/resources/{pluginId}/{typeId}/export-terraform
Raises on 400: Bad request
Raises on 404: Not found
func (*ResourcesNamespace) FieldAction ¶
func (n *ResourcesNamespace) FieldAction(ctx context.Context, params ResourcesFieldActionParams, opts ...RequestOption) (*FieldActionResponse, error)
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 ¶
func (n *ResourcesNamespace) ImportYAML(ctx context.Context, params ResourcesImportYAMLParams, opts ...RequestOption) (JSONObject, error)
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 ¶
func (n *ResourcesNamespace) Logs(ctx context.Context, params ResourcesLogsParams, opts ...RequestOption) (*LogsResponse, error)
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 ¶
func (n *ResourcesNamespace) Metrics(ctx context.Context, params ResourcesMetricsParams, opts ...RequestOption) (*MetricsResponse, error)
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 ¶
func (n *ResourcesNamespace) NoSQLCommand(ctx context.Context, params ResourcesNoSQLCommandParams, opts ...RequestOption) (*ResourcesNoSqlcommandResponse, error)
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 ¶
func (n *ResourcesNamespace) PickerResources(ctx context.Context, params ResourcesPickerResourcesParams, opts ...RequestOption) ([]PickerResource, error)
PickerResources: Fetch options for a `resource-picker` field
_Requires permission: `resources:read`._
POST /api/org/{orgId}/resources/picker-resources
func (*ResourcesNamespace) Update ¶
func (n *ResourcesNamespace) Update(ctx context.Context, params ResourcesUpdateParams, opts ...RequestOption) (*UpdateResourceResponse, error)
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 ¶
func (n *ResourcesSecretVersionsNamespace) Access(ctx context.Context, params ResourcesSecretVersionsAccessParams, opts ...RequestOption) (*SecretAccessResponse, error)
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 ¶
func (n *ResourcesSecretVersionsNamespace) Add(ctx context.Context, params ResourcesSecretVersionsAddParams, opts ...RequestOption) (*SecretVersionResponse, error)
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 ¶
func (n *ResourcesSecretVersionsNamespace) Get(ctx context.Context, params ResourcesSecretVersionsGetParams, opts ...RequestOption) (*SecretVersionsResponse, error)
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 ¶
func (n *ResourcesSecretVersionsNamespace) Modify(ctx context.Context, params ResourcesSecretVersionsModifyParams, opts ...RequestOption) (*SecretVersionResponse, error)
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
func (n *RightsizingNamespace) Get(ctx context.Context, params *RightsizingGetParams, opts ...RequestOption) (*RightsizingListResponse, error)
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
func (n *SSHFanoutNamespace) Run(ctx context.Context, params SSHFanoutRunParams, opts ...RequestOption) (*SSHFanoutRunResponse, error)
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
func (n *SSHFanoutNamespace) Targets(ctx context.Context, params *SSHFanoutTargetsParams, opts ...RequestOption) (*SSHFanoutTargetsResponse, error)
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
func (n *SSHFanoutSnippetsNamespace) Create(ctx context.Context, params SSHFanoutSnippetsCreateParams, opts ...RequestOption) (*SshfanoutSnippetsCreateResponse, error)
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
func (n *SSHFanoutSnippetsNamespace) Delete(ctx context.Context, params SSHFanoutSnippetsDeleteParams, opts ...RequestOption) (*OK, error)
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
func (n *SSHFanoutSnippetsNamespace) Get(ctx context.Context, params *SSHFanoutSnippetsGetParams, opts ...RequestOption) (*SshfanoutSnippetsGetResponse, error)
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
func (n *SSHFanoutSnippetsNamespace) Update(ctx context.Context, params SSHFanoutSnippetsUpdateParams, opts ...RequestOption) (*OK, error)
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 ¶
func (n *SSHKeysNamespace) Create(ctx context.Context, params SSHKeysCreateParams, opts ...RequestOption) (*GeneratedSSHKey, error)
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 ¶
func (n *SSHKeysNamespace) Import(ctx context.Context, params SSHKeysImportParams, opts ...RequestOption) (*ImportedSSHKey, error)
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 ¶
func (n *SSHTunnelsNamespace) Active(ctx context.Context, params *SSHTunnelsActiveParams, opts ...RequestOption) (map[string]ActiveTunnel, error)
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 ¶
func (n *SSHTunnelsNamespace) CreateAccount(ctx context.Context, params SSHTunnelsCreateAccountParams, opts ...RequestOption) (*SSHTunnelCreateAccountResponse, error)
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 ¶
func (n *SSHTunnelsNamespace) Exec(ctx context.Context, params SSHTunnelsExecParams, opts ...RequestOption) (*SSHExecResponse, error)
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 ¶
func (n *SSHTunnelsNamespace) Open(ctx context.Context, params SSHTunnelsOpenParams, opts ...RequestOption) (*SshtunnelsOpenResponse, error)
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 SavedCostFilter ¶ added in v1.6.0
type SavedCostFilter struct {
ID string `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
Filters []SavedCostFilterTerm `json:"filters"`
// Query: The canonical cost-query-language rendering of `filters`, derived
// server-side.
Query string `json:"query"`
CreatedByUserID *string `json:"createdByUserId"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
SavedCostFilter is the `SavedCostFilter` schema.
type SavedCostFilterInput ¶ added in v1.6.0
type SavedCostFilterInput struct {
Name string `json:"name"`
Description *string `json:"description,omitempty"`
// Filters: The structured filter. May be omitted only when `query` is sent
// instead.
Filters []SavedCostFilterTerm `json:"filters,omitempty"`
// Query: The same filter written in the cost query language — an alternative
// spelling of `filters`, compiled server-side into exactly that structure.
// Sending both a query and a non-empty `filters` is a 400, not a precedence
// rule. Whichever spelling is used, the result must be non-empty (an empty
// saved filter matches everything, which is the same as no filter wearing a
// name) and every tag term must carry its key.
Query *string `json:"query,omitempty"`
}
SavedCostFilterInput is the `SavedCostFilterInput` schema.
type SavedCostFilterReferent ¶ added in v1.6.0
type SavedCostFilterReferent struct {
// Kind: One of "budget", "cost_report", "cost_graph_widget".
Kind string `json:"kind"`
// ID: Budget id, report id, or dashboard-widget id.
ID string `json:"id"`
// Name: Budget name, report name, or the widget's title.
Name string `json:"name"`
// DashboardID: Set for `cost_graph_widget` referents.
DashboardID *string `json:"dashboardId,omitempty"`
DashboardName *string `json:"dashboardName,omitempty"`
}
SavedCostFilterReferent is the `SavedCostFilterReferent` schema.
type SavedCostFilterTerm ¶ added in v1.6.0
type SavedCostFilterTerm struct {
// Dimension: One of "provider", "account", "service", "region", "resource",
// "tag", "charge_type", "commitment".
Dimension string `json:"dimension"`
// Op: One of "in", "not_in".
Op string `json:"op"`
Values []string `json:"values"`
TagKey *string `json:"tagKey,omitempty"`
}
SavedCostFilterTerm is the `SavedCostFilterTerm` schema.
type SavedCostFiltersCreateParams ¶ added in v1.6.0
type SavedCostFiltersCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body SavedCostFilterInput
}
SavedCostFiltersCreateParams holds the parameters for `client.savedCostFilters.create`.
type SavedCostFiltersDeleteParams ¶ added in v1.6.0
type SavedCostFiltersDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
SavedCostFiltersDeleteParams holds the parameters for `client.savedCostFilters.delete`.
type SavedCostFiltersGetParams ¶ added in v1.6.0
type SavedCostFiltersGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
SavedCostFiltersGetParams holds the parameters for `client.savedCostFilters.get`.
type SavedCostFiltersListParams ¶ added in v1.6.0
type SavedCostFiltersListParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
SavedCostFiltersListParams holds the parameters for `client.savedCostFilters.list`.
Every field is optional; pass nil to take the defaults.
type SavedCostFiltersNamespace ¶ added in v1.6.0
type SavedCostFiltersNamespace struct {
// contains filtered or unexported fields
}
SavedCostFiltersNamespace is `client.savedCostFilters`.
func (*SavedCostFiltersNamespace) Create ¶ added in v1.6.0
func (n *SavedCostFiltersNamespace) Create(ctx context.Context, params SavedCostFiltersCreateParams, opts ...RequestOption) (*SavedCostFilter, error)
Create: Create a saved cost filter
Names must be unique per organization (case-insensitively) — they are how the CLI's `--filter <name>` and humans address the filter. A name collision is a 409.
_Requires permission: `costs:write`._
POST /api/org/{orgId}/saved-cost-filters
Raises on 400: Bad request
Raises on 409: A live saved filter already uses this name.
func (*SavedCostFiltersNamespace) Delete ¶ added in v1.6.0
func (n *SavedCostFiltersNamespace) Delete(ctx context.Context, params SavedCostFiltersDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Delete a saved cost filter
Soft delete — **refused with a 409 while anything references the filter**, with the referents in the body. Deleting a referenced filter would silently widen every referent's scope to all spend; for a budget that can fire or suppress alerts, so detaching the referents is a deliberate step, never a side effect of deletion.
_Requires permission: `costs:write`._
DELETE /api/org/{orgId}/saved-cost-filters/{id}
Raises on 404: Not found
Raises on 409: Still referenced — the body lists every referent.
func (*SavedCostFiltersNamespace) Get ¶ added in v1.6.0
func (n *SavedCostFiltersNamespace) Get(ctx context.Context, params SavedCostFiltersGetParams, opts ...RequestOption) (*SavedCostFilter, error)
Get: Get a saved cost filter
_Requires permission: `costs:read`._
GET /api/org/{orgId}/saved-cost-filters/{id}
Raises on 404: Not found
func (*SavedCostFiltersNamespace) List ¶ added in v1.6.0
func (n *SavedCostFiltersNamespace) List(ctx context.Context, params *SavedCostFiltersListParams, opts ...RequestOption) ([]SavedCostFilter, error)
List: List saved cost filters
Named, reusable cost filter sets. Graphs, reports and budgets reference one **by id** (`savedFilterId` in their configs and in `POST /costs/query`), and the server resolves the reference at query time — so editing a saved filter changes every referent at once, and nothing ever holds a copy.
_Requires permission: `costs:read`._
GET /api/org/{orgId}/saved-cost-filters
func (*SavedCostFiltersNamespace) Referents ¶ added in v1.6.0
func (n *SavedCostFiltersNamespace) Referents(ctx context.Context, params SavedCostFiltersReferentsParams, opts ...RequestOption) (*SavedCostFiltersReferentsResponse, error)
Referents: List a saved filter's referents
Every budget, cost report and dashboard cost graph referencing this filter — what an edit will re-scope, and what a delete would be refused over.
_Requires permission: `costs:read`._
GET /api/org/{orgId}/saved-cost-filters/{id}/referents
Raises on 404: Not found
func (*SavedCostFiltersNamespace) Update ¶ added in v1.6.0
func (n *SavedCostFiltersNamespace) Update(ctx context.Context, params SavedCostFiltersUpdateParams, opts ...RequestOption) (*SavedCostFilter, error)
Update: Update a saved cost filter
Replaces the filter's name, description and terms. This is the high-leverage write: every graph, report and budget referencing the filter runs the new terms on its next query — re-scoping a referenced budget can change which alerts fire. `GET /{id}/referents` names what a change will touch.
_Requires permission: `costs:write`._
PUT /api/org/{orgId}/saved-cost-filters/{id}
Raises on 400: Bad request
Raises on 404: Not found
Raises on 409: A live saved filter already uses this name.
type SavedCostFiltersReferentsParams ¶ added in v1.6.0
type SavedCostFiltersReferentsParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
SavedCostFiltersReferentsParams holds the parameters for `client.savedCostFilters.referents`.
type SavedCostFiltersReferentsResponse ¶ added in v1.6.0
type SavedCostFiltersReferentsResponse struct {
Referents []SavedCostFilterReferent `json:"referents"`
}
SavedCostFiltersReferentsResponse is an object the spec declares inline.
type SavedCostFiltersUpdateParams ¶ added in v1.6.0
type SavedCostFiltersUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
// Body: the JSON request body.
Body SavedCostFilterInput
}
SavedCostFiltersUpdateParams holds the parameters for `client.savedCostFilters.update`.
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
func (n *SchedulesNamespace) Create(ctx context.Context, params *SchedulesCreateParams, opts ...RequestOption) (*SleepSchedule, error)
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
func (n *SchedulesNamespace) Delete(ctx context.Context, params SchedulesDeleteParams, opts ...RequestOption) error
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
func (n *SchedulesNamespace) Get(ctx context.Context, params *SchedulesGetParams, opts ...RequestOption) (*SleepScheduleList, error)
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
func (n *SchedulesNamespace) Preview(ctx context.Context, params *SchedulesPreviewParams, opts ...RequestOption) (*SleepSchedulePreview, error)
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
func (n *SchedulesNamespace) Update(ctx context.Context, params SchedulesUpdateParams, opts ...RequestOption) (*SleepSchedule, error)
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: Total capacity: monthly subscription seats plus prepaid
// capacity-slot seats
SeatCount int64 `json:"seatCount"`
// SeatsUsed: Members plus pending unexpired invitations
SeatsUsed int64 `json:"seatsUsed"`
// CanAddSeat: Whether retrying with `addSeat: true` can succeed. False when
// the org's capacity is entirely prepaid capacity slots: there is no monthly
// seat to buy, so the only remedy is another capacity slot.
CanAddSeat bool `json:"canAddSeat"`
}
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 SessionRecording ¶ added in v0.43.0
type SessionRecording struct {
ID string `json:"id"`
// UserID: Who opened the session; null when the socket authenticated with an
// API key.
UserID *string `json:"userId"`
// UserName: Display-name snapshot taken at record time, so a departed member
// still reads as one.
UserName *string `json:"userName"`
AccountID *string `json:"accountId"`
ResourceID *string `json:"resourceId"`
// Host: Final hop, as dialled.
Host string `json:"host"`
Port int64 `json:"port"`
Username string `json:"username"`
// HopCount: 1 for a direct session; higher when it jumped through bastions.
HopCount int64 `json:"hopCount"`
Cols int64 `json:"cols"`
Rows int64 `json:"rows"`
// HasInput: True when the cast also contains keystrokes (the org opted into
// input capture).
HasInput bool `json:"hasInput"`
// Status: `recording` (live), `complete` (closed cleanly), `truncated` (hit
// the per-session capture ceiling — the tape is a genuine partial and says
// so), or `abandoned` (the server handling the session went away before it
// could close the row).
//
// One of "recording", "complete", "truncated", "abandoned".
Status string `json:"status"`
// OutputBytes: Terminal bytes captured, before compression.
OutputBytes int64 `json:"outputBytes"`
EventCount int64 `json:"eventCount"`
StartedAt string `json:"startedAt"`
EndedAt *string `json:"endedAt"`
DurationMs *int64 `json:"durationMs"`
}
SessionRecording is the `SessionRecording` schema.
type SessionRecordingSettings ¶ added in v0.43.0
type SessionRecordingSettings struct {
Enabled bool `json:"enabled"`
// CaptureInput: Also record keystrokes. Separate from `enabled` because it
// captures input at prompts the remote host chose not to echo — a sudo
// password, a pasted token — which is a materially different promise to the
// people being recorded.
CaptureInput bool `json:"captureInput"`
RetentionDays int64 `json:"retentionDays"`
Usage SessionRecordingUsage `json:"usage"`
}
SessionRecordingSettings is the `SessionRecordingSettings` schema.
type SessionRecordingSettingsUpdate ¶ added in v0.43.0
type SessionRecordingSettingsUpdate struct {
Enabled *bool `json:"enabled,omitempty"`
CaptureInput *bool `json:"captureInput,omitempty"`
RetentionDays *int64 `json:"retentionDays,omitempty"`
}
SessionRecordingSettingsUpdate is the `SessionRecordingSettingsUpdate` schema.
type SessionRecordingUsage ¶ added in v0.43.0
type SessionRecordingUsage struct {
RecordingCount int64 `json:"recordingCount"`
// StoredBytes: Compressed size actually stored.
StoredBytes int64 `json:"storedBytes"`
CapturedBytes int64 `json:"capturedBytes"`
OldestStartedAt *string `json:"oldestStartedAt"`
}
SessionRecordingUsage is the `SessionRecordingUsage` schema.
type SessionRecordingsCastParams ¶ added in v0.43.0
type SessionRecordingsCastParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
RecordingID string
// Download: Force an attachment disposition.
//
// One of "1".
Download *string
}
SessionRecordingsCastParams holds the parameters for `client.sessionRecordings.cast`.
type SessionRecordingsDeleteParams ¶ added in v0.43.0
type SessionRecordingsDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
RecordingID string
}
SessionRecordingsDeleteParams holds the parameters for `client.sessionRecordings.delete`.
type SessionRecordingsGetParams ¶ added in v0.43.0
type SessionRecordingsGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
RecordingID string
}
SessionRecordingsGetParams holds the parameters for `client.sessionRecordings.get`.
type SessionRecordingsListParams ¶ added in v0.43.0
type SessionRecordingsListParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Status: `recording` (live), `complete` (closed cleanly), `truncated` (hit
// the per-session capture ceiling — the tape is a genuine partial and says
// so), or `abandoned` (the server handling the session went away before it
// could close the row).
//
// One of "recording", "complete", "truncated", "abandoned".
Status *string
UserID *string
ResourceID *string
AccountID *string
// Since: Inclusive lower bound on `startedAt`.
Since *string
// Until: Exclusive upper bound on `startedAt`.
Until *string
Limit *int64
}
SessionRecordingsListParams holds the parameters for `client.sessionRecordings.list`.
Every field is optional; pass nil to take the defaults.
type SessionRecordingsNamespace ¶ added in v0.43.0
type SessionRecordingsNamespace struct {
// Settings: `client.sessionRecordings.settings`.
Settings *SessionRecordingsSettingsNamespace
// contains filtered or unexported fields
}
SessionRecordingsNamespace is `client.sessionRecordings`.
func (*SessionRecordingsNamespace) Cast ¶ added in v0.43.0
func (n *SessionRecordingsNamespace) Cast(ctx context.Context, params SessionRecordingsCastParams, opts ...RequestOption) (io.ReadCloser, error)
Cast: Download a recording as an asciicast
The session as an [asciicast v2](https://docs.asciinema.org/manual/asciicast/v2/) document: a JSON header line followed by one `[time, code, data]` event per line. Deliberately somebody else's format — the same bytes play in `asciinema play` and in the reference web player, so a recording is useful to an auditor who has never seen this product. `?download=1` returns it as an attachment. **Every fetch is audit-logged**, including this one: an investigator has to be able to answer who has watched a given tape.
_Requires permission: `session-recordings:read`._
GET /api/org/{orgId}/session-recordings/{recordingId}/cast
Raises on 404: Not found
func (*SessionRecordingsNamespace) Delete ¶ added in v0.43.0
func (n *SessionRecordingsNamespace) Delete(ctx context.Context, params SessionRecordingsDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Delete a recording
Removes the recording and its stored chunks. Audit-logged.
_Requires permission: `session-recordings:write`._
DELETE /api/org/{orgId}/session-recordings/{recordingId}
Raises on 404: Not found
func (*SessionRecordingsNamespace) Get ¶ added in v0.43.0
func (n *SessionRecordingsNamespace) Get(ctx context.Context, params SessionRecordingsGetParams, opts ...RequestOption) (*SessionRecording, error)
Get: Get one recording's metadata
_Requires permission: `session-recordings:read`._
GET /api/org/{orgId}/session-recordings/{recordingId}
Raises on 404: Not found
func (*SessionRecordingsNamespace) List ¶ added in v0.43.0
func (n *SessionRecordingsNamespace) List(ctx context.Context, params *SessionRecordingsListParams, opts ...RequestOption) ([]SessionRecording, error)
List: List recorded SSH sessions
Recorded sessions, newest first. Only SSH opened through the cloud is recorded — those sessions are already proxied by the server, so recording tees a stream it holds rather than requiring an agent on the host. A desktop session that dials a host directly never reaches the server and cannot appear here.
_Requires permission: `session-recordings:read`._
GET /api/org/{orgId}/session-recordings
Raises on 400: Bad request
type SessionRecordingsSettingsGetParams ¶ added in v0.43.0
type SessionRecordingsSettingsGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
SessionRecordingsSettingsGetParams holds the parameters for `client.sessionRecordings.settings.get`.
Every field is optional; pass nil to take the defaults.
type SessionRecordingsSettingsNamespace ¶ added in v0.43.0
type SessionRecordingsSettingsNamespace struct {
// contains filtered or unexported fields
}
SessionRecordingsSettingsNamespace is `client.sessionRecordings.settings`.
func (*SessionRecordingsSettingsNamespace) Get ¶ added in v0.43.0
func (n *SessionRecordingsSettingsNamespace) Get(ctx context.Context, params *SessionRecordingsSettingsGetParams, opts ...RequestOption) (*SessionRecordingSettings, error)
Get: Get the recording policy
The organization's recording policy plus what it currently stores. Usage rides along with the policy because the only question anyone asks about retention is what it costs.
_Requires permission: `session-recordings:read`._
GET /api/org/{orgId}/session-recordings/settings
func (*SessionRecordingsSettingsNamespace) Update ¶ added in v0.43.0
func (n *SessionRecordingsSettingsNamespace) Update(ctx context.Context, params *SessionRecordingsSettingsUpdateParams, opts ...RequestOption) (*SessionRecordingSettings, error)
Update: Update the recording policy
Partial update — omitted fields keep their current value. Recording is opt-in and off by default. Audit-logged with the before/after policy.
_Requires permission: `session-recordings:write`._
PUT /api/org/{orgId}/session-recordings/settings
Raises on 400: Bad request
type SessionRecordingsSettingsUpdateParams ¶ added in v0.43.0
type SessionRecordingsSettingsUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *SessionRecordingSettingsUpdate
}
SessionRecordingsSettingsUpdateParams holds the parameters for `client.sessionRecordings.settings.update`.
Every field is optional; pass nil to take the defaults.
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"`
}
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"`
}
SlackChannelCreate is the `SlackChannelCreate` schema.
type SlackChannelUpdate ¶ added in v0.3.0
type SlackChannelUpdate struct {
ChannelName string `json:"channelName"`
}
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
func (n *SlackChannelsNamespace) Create(ctx context.Context, params *SlackChannelsCreateParams, opts ...RequestOption) (*SlackChannel, error)
Create: Connect a Slack channel as an alert destination
Adds a channel as a possible destination, or refreshes the cached name of one already added. Which alerts reach it is decided by /alert-rules; an organization with no rules falls back to the default (everything except drift, everywhere), so a freshly added channel starts receiving alerts without a second step.
POST /api/org/{orgId}/slack/channels
Raises on 400: Bad request
Raises on 404: Not found
func (*SlackChannelsNamespace) Delete ¶ added in v0.3.0
func (n *SlackChannelsNamespace) Delete(ctx context.Context, params SlackChannelsDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Disconnect a channel
DELETE /api/org/{orgId}/slack/channels/{id}
Raises on 404: Not found
func (*SlackChannelsNamespace) Update ¶ added in v0.3.0
func (n *SlackChannelsNamespace) Update(ctx context.Context, params SlackChannelsUpdateParams, opts ...RequestOption) (*SlackChannel, error)
Update: Refresh a channel's cached name
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
func (n *SlackInstallationsNamespace) AvailableChannels(ctx context.Context, params SlackInstallationsAvailableChannelsParams, opts ...RequestOption) (*SlackInstallationsAvailableChannelsResponse, error)
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
func (n *SlackInstallationsNamespace) Delete(ctx context.Context, params SlackInstallationsDeleteParams, opts ...RequestOption) (*OK, error)
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
func (n *SlackNamespace) InstallURL(ctx context.Context, params *SlackInstallURLParams, opts ...RequestOption) (*SlackInstallUrlresponse, error)
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
func (n *SlackNamespace) Test(ctx context.Context, params *SlackTestParams, opts ...RequestOption) (*SlackTestResponse, error)
Test: Post a test message to every configured channel
Ignores routing rules — 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 StatusGetParams ¶ added in v0.44.0
type StatusGetParams struct {
Slug string
}
StatusGetParams holds the parameters for `client.status.get`.
type StatusHistoryDay ¶ added in v0.44.0
type StatusHistoryDay struct {
// Day: `YYYY-MM-DD`, UTC.
Day string `json:"day"`
// Uptime: Fraction of the day the endpoint was up (0–1), or null when
// nothing was recorded.
Uptime *float64 `json:"uptime"`
}
StatusHistoryDay is the `StatusHistoryDay` 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
func (n *StatusIncidentsNamespace) Get(ctx context.Context, params *StatusIncidentsGetParams, opts ...RequestOption) (*OrgStatusIncidentsResponse, error)
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 StatusNamespace ¶ added in v0.44.0
type StatusNamespace struct {
// contains filtered or unexported fields
}
StatusNamespace is `client.status`.
func (*StatusNamespace) Get ¶ added in v0.44.0
func (n *StatusNamespace) Get(ctx context.Context, params StatusGetParams, opts ...RequestOption) (*PublicStatusPage, error)
Get: Read a public status page
**Unauthenticated.** The only endpoint in this API that takes no credentials — a status page exists for people with no account. The payload carries labels, states and uptime history only: probe URLs, resource and account ids, the organization id and error detail are never included. An unpublished page and an unknown slug both answer 404, so the endpoint cannot be used to confirm that a slug is real.
GET /api/status/{slug}
Raises on 404: Not found
type StatusPage ¶ added in v0.44.0
type StatusPage struct {
ID string `json:"id"`
// Slug: The public URL segment, and the page's only access credential.
// Generated with real entropy rather than derived from the title.
Slug string `json:"slug"`
Title string `json:"title"`
Description *string `json:"description"`
// Published: False until deliberately published; a fresh page is never
// reachable.
Published bool `json:"published"`
ShowHistory bool `json:"showHistory"`
ShowUptime bool `json:"showUptime"`
SupportURL *string `json:"supportUrl"`
Components []StatusPageComponent `json:"components"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
StatusPage is the `StatusPage` schema.
type StatusPageComponent ¶ added in v0.44.0
type StatusPageComponent struct {
ID string `json:"id"`
ProbeID string `json:"probeId"`
// Label: Public name; null falls back to the probe's own name.
Label *string `json:"label"`
GroupName *string `json:"groupName"`
// Position: Ascending display order.
Position int64 `json:"position"`
// ProbeName: The probe's internal name — editor-only.
ProbeName string `json:"probeName"`
// ProbeStatus: One of "up", "down", "unknown".
ProbeStatus string `json:"probeStatus"`
// ProbeEnabled: False when the probe is paused.
ProbeEnabled bool `json:"probeEnabled"`
}
StatusPageComponent is the `StatusPageComponent` schema.
type StatusPageComponentInput ¶ added in v0.44.0
type StatusPageComponentInput struct {
ProbeID string `json:"probeId"`
Label *string `json:"label,omitempty"`
GroupName *string `json:"groupName,omitempty"`
}
StatusPageComponentInput is the `StatusPageComponentInput` schema.
type StatusPageCreate ¶ added in v0.44.0
type StatusPageCreate struct {
Title string `json:"title"`
Description *string `json:"description,omitempty"`
// Published: Defaults to false.
Published *bool `json:"published,omitempty"`
ShowHistory *bool `json:"showHistory,omitempty"`
ShowUptime *bool `json:"showUptime,omitempty"`
SupportURL *string `json:"supportUrl,omitempty"`
// Components: Order is significant — it is the public render order.
Components []StatusPageComponentInput `json:"components,omitempty"`
}
StatusPageCreate is the `StatusPageCreate` schema.
type StatusPageListResponse ¶ added in v0.44.0
type StatusPageListResponse struct {
Pages []StatusPage `json:"pages"`
}
StatusPageListResponse is the `StatusPageListResponse` schema.
type StatusPagePatch ¶ added in v0.44.0
type StatusPagePatch struct {
Title *string `json:"title,omitempty"`
Description *string `json:"description,omitempty"`
Published *bool `json:"published,omitempty"`
ShowHistory *bool `json:"showHistory,omitempty"`
ShowUptime *bool `json:"showUptime,omitempty"`
SupportURL *string `json:"supportUrl,omitempty"`
// Components: When present, replaces the whole set.
Components []StatusPageComponentInput `json:"components,omitempty"`
}
StatusPagePatch is the `StatusPagePatch` schema.
type StatusPagesCreateParams ¶ added in v0.44.0
type StatusPagesCreateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
// Body: the JSON request body.
Body *StatusPageCreate
}
StatusPagesCreateParams holds the parameters for `client.statusPages.create`.
Every field is optional; pass nil to take the defaults.
type StatusPagesDeleteParams ¶ added in v0.44.0
type StatusPagesDeleteParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
StatusPagesDeleteParams holds the parameters for `client.statusPages.delete`.
type StatusPagesGetParams ¶ added in v0.44.0
type StatusPagesGetParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
}
StatusPagesGetParams holds the parameters for `client.statusPages.get`.
Every field is optional; pass nil to take the defaults.
type StatusPagesNamespace ¶ added in v0.44.0
type StatusPagesNamespace struct {
// contains filtered or unexported fields
}
StatusPagesNamespace is `client.statusPages`.
func (*StatusPagesNamespace) Create ¶ added in v0.44.0
func (n *StatusPagesNamespace) Create(ctx context.Context, params *StatusPagesCreateParams, opts ...RequestOption) (*StatusPage, error)
Create: Create a status page
Creates a page with a freshly generated slug. `published` defaults to false, so creating a page never exposes anything — publish it as a separate, deliberate step.
_Requires permission: `resources:write`._
POST /api/org/{orgId}/status-pages
Raises on 400: Bad request
Raises on 404: Not found
func (*StatusPagesNamespace) Delete ¶ added in v0.44.0
func (n *StatusPagesNamespace) Delete(ctx context.Context, params StatusPagesDeleteParams, opts ...RequestOption) error
Delete: Delete a status page
The page's link stops working. The probes it published are untouched.
_Requires permission: `resources:write`._
DELETE /api/org/{orgId}/status-pages/{id}
Raises on 404: Not found
func (*StatusPagesNamespace) Get ¶ added in v0.44.0
func (n *StatusPagesNamespace) Get(ctx context.Context, params *StatusPagesGetParams, opts ...RequestOption) (*StatusPageListResponse, error)
Get: List status pages
Every status page in the organization, with the probes each publishes and whether it is currently reachable.
_Requires permission: `resources:read`._
GET /api/org/{orgId}/status-pages
func (*StatusPagesNamespace) RotateSlug ¶ added in v0.44.0
func (n *StatusPagesNamespace) RotateSlug(ctx context.Context, params StatusPagesRotateSlugParams, opts ...RequestOption) (*StatusPage, error)
RotateSlug: Issue a new public link
Replaces the slug, revoking the current public URL immediately — the reroll for a link that ended up somewhere unintended. The page stays published.
_Requires permission: `resources:write`._
POST /api/org/{orgId}/status-pages/{id}/rotate-slug
Raises on 404: Not found
func (*StatusPagesNamespace) Update ¶ added in v0.44.0
func (n *StatusPagesNamespace) Update(ctx context.Context, params StatusPagesUpdateParams, opts ...RequestOption) (*StatusPage, error)
Update: Update a status page
Omitted fields keep their value. `components`, when present, replaces the whole ordered set — which is also how a reorder is expressed.
_Requires permission: `resources:write`._
PUT /api/org/{orgId}/status-pages/{id}
Raises on 400: Bad request
Raises on 404: Not found
type StatusPagesRotateSlugParams ¶ added in v0.44.0
type StatusPagesRotateSlugParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
}
StatusPagesRotateSlugParams holds the parameters for `client.statusPages.rotateSlug`.
type StatusPagesUpdateParams ¶ added in v0.44.0
type StatusPagesUpdateParams struct {
// OrgID: Organization id
//
// Falls back to the client's `orgId` when omitted.
OrgID *string
ID string
// Body: the JSON request body.
Body *StatusPagePatch
}
StatusPagesUpdateParams holds the parameters for `client.statusPages.update`.
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 ¶
func (n *StorageNamespace) Download(ctx context.Context, params StorageDownloadParams, opts ...RequestOption) (io.ReadCloser, error)
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 ¶
func (n *StorageNamespace) List(ctx context.Context, params StorageListParams, opts ...RequestOption) ([]StorageObject, error)
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
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 SyntheticProbe ¶ added in v0.33.0
type SyntheticProbe struct {
ID string `json:"id"`
Name string `json:"name"`
// URL: Absolute http(s) URL the check hits from the edge proxy.
URL string `json:"url"`
// Method: HTTP method the probe uses — GET, HEAD or OPTIONS. Unknown values
// become GET.
Method string `json:"method"`
// IntervalSeconds: Seconds between checks. Clamped server-side to 60–86400.
IntervalSeconds int64 `json:"intervalSeconds"`
// TimeoutMs: Per-check timeout in milliseconds. Clamped server-side to
// 1000–60000.
TimeoutMs int64 `json:"timeoutMs"`
// FailureThreshold: Consecutive failures before the probe flips to `down`
// and notifies. Clamped 1–20.
FailureThreshold int64 `json:"failureThreshold"`
Enabled bool `json:"enabled"`
// AccountID: Account of the linked resource, when the URL came from one.
AccountID *string `json:"accountId"`
// ResourceID: Linked resource id; advisory, not a foreign key.
ResourceID *string `json:"resourceId"`
PluginID *PluginID `json:"pluginId"`
ResourceTypeID *string `json:"resourceTypeId"`
// OutputKey: The resource output/field key the URL was suggested from.
OutputKey *string `json:"outputKey"`
// Status: The probe's state machine: `unknown` until the first result,
// `down` after `failureThreshold` consecutive failures, `up` on any success.
//
// One of "up", "down", "unknown".
Status string `json:"status"`
ConsecutiveFailures int64 `json:"consecutiveFailures"`
LastProbeAt *string `json:"lastProbeAt"`
LastStatusCode *int64 `json:"lastStatusCode"`
LastLatencyMs *int64 `json:"lastLatencyMs"`
// LastError: Failure detail; null after a success.
LastError *string `json:"lastError"`
// LastStateChangeAt: When status last flipped up/down.
LastStateChangeAt *string `json:"lastStateChangeAt"`
// Uptime24h: Fraction (0–1) of the trailing 24h the endpoint was up, from
// the recorded series; null before the first result lands in the metric
// store.
Uptime24h *float64 `json:"uptime24h"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
SyntheticProbe is the `SyntheticProbe` schema.
type SyntheticProbeCreate ¶ added in v0.33.0
type SyntheticProbeCreate struct {
Name string `json:"name"`
URL string `json:"url"`
// Method: HTTP method the probe uses — GET, HEAD or OPTIONS. Unknown values
// become GET.
Method *string `json:"method,omitempty"`
// IntervalSeconds: Seconds between checks. Clamped server-side to 60–86400.
IntervalSeconds *int64 `json:"intervalSeconds,omitempty"`
// TimeoutMs: Per-check timeout in milliseconds. Clamped server-side to
// 1000–60000.
TimeoutMs *int64 `json:"timeoutMs,omitempty"`
// FailureThreshold: Consecutive failures before the probe flips to `down`
// and notifies. Clamped 1–20.
FailureThreshold *int64 `json:"failureThreshold,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
// ResourceID: Link the probe to the resource whose output suggested the URL.
ResourceID *string `json:"resourceId,omitempty"`
OutputKey *string `json:"outputKey,omitempty"`
}
SyntheticProbeCreate is the `SyntheticProbeCreate` schema.
type SyntheticProbeList ¶ added in v0.33.0
type SyntheticProbeList struct {
Probes []SyntheticProbe `json:"probes"`
}
SyntheticProbeList is the `SyntheticProbeList` schema.
type SyntheticProbeUpdate ¶ added in v0.33.0
type SyntheticProbeUpdate struct {
Name *string `json:"name,omitempty"`
URL *string `json:"url,omitempty"`
// Method: HTTP method the probe uses — GET, HEAD or OPTIONS. Unknown values
// become GET.
Method *string `json:"method,omitempty"`
// IntervalSeconds: Seconds between checks. Clamped server-side to 60–86400.
IntervalSeconds *int64 `json:"intervalSeconds,omitempty"`
// TimeoutMs: Per-check timeout in milliseconds. Clamped server-side to
// 1000–60000.
TimeoutMs *int64 `json:"timeoutMs,omitempty"`
// FailureThreshold: Consecutive failures before the probe flips to `down`
// and notifies. Clamped 1–20.
FailureThreshold *int64 `json:"failureThreshold,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
}
SyntheticProbeUpdate is the `SyntheticProbeUpdate` 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", "cost-reports", "graph", "logs", "changes", "expiring",
// "posture", "dns", "environment-diff", "ssh-fanout", "metric-alerts",
// "probes", "workflows", "deployments", "settings", "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"`
ReportID *string `json:"reportId,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
func (n *TagPolicyNamespace) Compliance(ctx context.Context, params *TagPolicyComplianceParams, opts ...RequestOption) (*TagComplianceReport, error)
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
func (n *TagPolicyNamespace) Get(ctx context.Context, params *TagPolicyGetParams, opts ...RequestOption) (*TagPolicy, error)
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
func (n *TagPolicyNamespace) Update(ctx context.Context, params TagPolicyUpdateParams, opts ...RequestOption) (*TagPolicy, error)
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 ¶
func (n *TeamInvitationsNamespace) Create(ctx context.Context, params TeamInvitationsCreateParams, opts ...RequestOption) (*InviteResponse, error)
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 403: The role would grant permissions the caller does not hold, or the caller is not an owner and tried to invite an owner
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 ¶
func (n *TeamInvitationsNamespace) Delete(ctx context.Context, params TeamInvitationsDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Revoke a pending invitation
_Requires permission: `team:invite`._
DELETE /api/org/{orgId}/team/invitations/{id}
Raises on 404: Not found
func (*TeamInvitationsNamespace) List ¶
func (n *TeamInvitationsNamespace) List(ctx context.Context, params *TeamInvitationsListParams, opts ...RequestOption) ([]Invitation, error)
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 ¶
func (n *TeamMembersNamespace) Delete(ctx context.Context, params TeamMembersDeleteParams, opts ...RequestOption) (*OK, error)
Delete: Remove a member from the org
_Requires permission: `team:remove`._
DELETE /api/org/{orgId}/team/members/{id}
func (*TeamMembersNamespace) List ¶
func (n *TeamMembersNamespace) List(ctx context.Context, params *TeamMembersListParams, opts ...RequestOption) ([]OrgMember, error)
List: List org members
_Requires permission: `team:read`._
GET /api/org/{orgId}/team/members
func (*TeamMembersNamespace) Role ¶
func (n *TeamMembersNamespace) Role(ctx context.Context, params TeamMembersRoleParams, opts ...RequestOption) (*OK, error)
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 TerraformExport ¶ added in v1.3.0
type TerraformExport struct {
Hcl string `json:"hcl"`
Exported []TerraformExportExported `json:"exported"`
Unsupported []TerraformExportUnsupported `json:"unsupported"`
}
TerraformExport is the `TerraformExport` schema.
type TerraformExportExported ¶ added in v1.3.0
type TerraformExportExported struct {
ID ResourceID `json:"id"`
DisplayName string `json:"displayName"`
PluginID string `json:"pluginId"`
ResourceTypeID string `json:"resourceTypeId"`
Address string `json:"address"`
ImportID *string `json:"importId,omitempty"`
}
TerraformExportExported is an object the spec declares inline.
type TerraformExportUnsupported ¶ added in v1.3.0
type TerraformExportUnsupported struct {
ID ResourceID `json:"id"`
DisplayName string `json:"displayName"`
PluginID string `json:"pluginId"`
ResourceTypeID string `json:"resourceTypeId"`
Reason string `json:"reason"`
}
TerraformExportUnsupported is an object the spec declares inline.
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 ¶
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
func (n *WorkflowApprovalsNamespace) Approve(ctx context.Context, params WorkflowApprovalsApproveParams, opts ...RequestOption) (*WorkflowApproval, error)
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
func (n *WorkflowApprovalsNamespace) Deny(ctx context.Context, params WorkflowApprovalsDenyParams, opts ...RequestOption) (*WorkflowApproval, error)
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
func (n *WorkflowApprovalsNamespace) List(ctx context.Context, params *WorkflowApprovalsListParams, opts ...RequestOption) ([]WorkflowApproval, error)
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
func (n *WorkflowsScheduleNamespace) Delete(ctx context.Context, params WorkflowsScheduleDeleteParams, opts ...RequestOption) (*OK, error)
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
func (n *WorkflowsScheduleNamespace) Get(ctx context.Context, params WorkflowsScheduleGetParams, opts ...RequestOption) (*WorkflowScheduleResponse, error)
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
func (n *WorkflowsScheduleNamespace) Update(ctx context.Context, params WorkflowsScheduleUpdateParams, opts ...RequestOption) (*WorkflowScheduleResponse, error)
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`.