From 5b4f3abe41b15736cf541563bff18ca05f55d639 Mon Sep 17 00:00:00 2001 From: caballeto Date: Wed, 6 May 2026 13:17:38 +0200 Subject: [PATCH] chore(spec): refresh spec for launch sprint + qualified enum constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mono#369 adds MonitorStatus enum (UP/DOWN/DEGRADED/PAUSED/UNKNOWN) and IncidentFilterParamsSeverity (DOWN/DEGRADED), which causes oapi-codegen to namespace-qualify previously-unique enum constants: - generated.Email → generated.EmailChannelConfigChannelTypeEmail - generated.Down → generated.TriggerRuleSeverityDown - generated.Degraded → generated.TriggerRuleSeverityDegraded It also makes managedBy nullable on Create/Update DTOs (now *string pointer), and adds managedBy to Create/Update Status Page, Resource Group, and Alert Channel DTOs. Changes: - Refresh spec + regenerate types - Update enum constant references to qualified names - Wrap CreateMonitorRequest.ManagedBy in pointer (and similar for status page, resource group, alert channel) — provider continues to hardcode TERRAFORM for attribution - Allow-list new managed_by fields in schema-vs-DTO audit - Update monitor unit test for pointer ManagedBy Co-authored-by: Cursor --- docs/openapi/monitoring-api.json | 230 +++++++- internal/generated/types.go | 495 +++++++++++++++++- internal/provider/resources/alert_channel.go | 14 +- internal/provider/resources/monitor.go | 7 +- internal/provider/resources/monitor_test.go | 4 +- internal/provider/resources/resource_group.go | 4 + .../resources/schema_dto_audit_test.go | 22 +- internal/provider/resources/status_page.go | 4 + 8 files changed, 718 insertions(+), 62 deletions(-) diff --git a/docs/openapi/monitoring-api.json b/docs/openapi/monitoring-api.json index 41903c1..b60c933 100644 --- a/docs/openapi/monitoring-api.json +++ b/docs/openapi/monitoring-api.json @@ -166,8 +166,52 @@ "Alert Channels" ], "summary": "List active alert channels for the authenticated org", + "description": "Supports filtering by `type` (channel integration), `managedBy` (creating surface), and `search` (case-insensitive contains on name). Unrecognised query parameters are silently ignored — pin to the documented set above.", "operationId": "list_14", "parameters": [ + { + "name": "type", + "in": "query", + "description": "Filter by channel integration type (e.g. SLACK, WEBHOOK, EMAIL)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "email", + "webhook", + "slack", + "pagerduty", + "opsgenie", + "teams", + "discord" + ] + } + }, + { + "name": "managedBy", + "in": "query", + "description": "Filter by managed-by source (DASHBOARD, CLI, TERRAFORM, MCP, API)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "DASHBOARD", + "CLI", + "TERRAFORM", + "MCP", + "API" + ] + } + }, + { + "name": "search", + "in": "query", + "description": "Case-insensitive contains-match on the channel name", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "pageable", "in": "query", @@ -6374,17 +6418,27 @@ "Monitors" ], "summary": "List monitors for the authenticated org", + "description": "Supports filtering by `enabled`, `status` (alias active|paused for enabled), `type`, `managedBy`, `tag` / `tags`, `search`, and `environmentId`. Unrecognised query parameters are silently ignored (Spring's default binding behaviour) — pin to the documented set above.", "operationId": "list_8", "parameters": [ { "name": "enabled", "in": "query", - "description": "Filter by enabled state", + "description": "Filter by enabled state (true/false)", "required": false, "schema": { "type": "boolean" } }, + { + "name": "status", + "in": "query", + "description": "Lifecycle status alias: 'active' (enabled=true) or 'paused' (enabled=false). Ignored when ?enabled is also supplied.", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "type", "in": "query", @@ -6412,14 +6466,25 @@ "enum": [ "DASHBOARD", "CLI", - "TERRAFORM" + "TERRAFORM", + "MCP", + "API" ] } }, { "name": "tags", "in": "query", - "description": "Filter by tag names, comma-separated (e.g. prod,critical)", + "description": "Filter by tag names, comma-separated (e.g. prod,critical); OR semantics", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "Filter by a single tag name (alias for ?tags=); merged with ?tags using OR semantics", "required": false, "schema": { "type": "string" @@ -21727,6 +21792,18 @@ "description": "SHA-256 hash of the channel config; use for change detection", "nullable": true }, + "managedBy": { + "type": "string", + "description": "Source that created/owns this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on channels created before this attribution column existed.", + "nullable": true, + "enum": [ + "DASHBOARD", + "CLI", + "TERRAFORM", + "MCP", + "API" + ] + }, "lastDeliveryAt": { "type": "string", "description": "Timestamp of the most recent delivery attempt", @@ -22927,6 +23004,18 @@ "$ref": "#/components/schemas/WebhookChannelConfig" } ] + }, + "managedBy": { + "type": "string", + "description": "Source creating this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted.", + "nullable": true, + "enum": [ + "DASHBOARD", + "CLI", + "TERRAFORM", + "MCP", + "API" + ] } } }, @@ -23187,12 +23276,14 @@ "maxLength": 100, "minLength": 0, "type": "string", - "description": "iCal RRULE for recurring windows (max 100 chars); null for one-time", + "description": "Reserved: iCal RRULE for recurring windows (stored but not yet honored)", "nullable": true }, "reason": { + "maxLength": 500, + "minLength": 0, "type": "string", - "description": "Human-readable reason for the maintenance", + "description": "Human-readable reason for the maintenance (max 500 chars)", "nullable": true }, "suppressAlerts": { @@ -23239,7 +23330,6 @@ "CreateMonitorRequest": { "required": [ "config", - "managedBy", "name", "type" ], @@ -23307,11 +23397,14 @@ }, "managedBy": { "type": "string", - "description": "Who manages this monitor: DASHBOARD or CLI", + "description": "Source that created/owns this monitor: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted; set to your surface so audit logs, drift detection, and analytics attribute correctly.", + "nullable": true, "enum": [ "DASHBOARD", "CLI", - "TERRAFORM" + "TERRAFORM", + "MCP", + "API" ] }, "environmentId": { @@ -23506,6 +23599,18 @@ "description": "Recovery cooldown in minutes after group incident resolves (0–60)", "format": "int32", "nullable": true + }, + "managedBy": { + "type": "string", + "description": "Source creating this group: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted.", + "nullable": true, + "enum": [ + "DASHBOARD", + "CLI", + "TERRAFORM", + "MCP", + "API" + ] } }, "description": "Request body for creating a resource group" @@ -23807,6 +23912,18 @@ "REVIEW", "AUTOMATIC" ] + }, + "managedBy": { + "type": "string", + "description": "Source creating this page: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted.", + "nullable": true, + "enum": [ + "DASHBOARD", + "CLI", + "TERRAFORM", + "MCP", + "API" + ] } } }, @@ -26432,7 +26549,7 @@ }, "repeatRule": { "type": "string", - "description": "iCal RRULE for recurring windows; null for one-time", + "description": "Reserved: iCal RRULE for recurring windows (stored but not yet honored)", "nullable": true }, "reason": { @@ -27194,11 +27311,13 @@ }, "managedBy": { "type": "string", - "description": "Management source: DASHBOARD or CLI", + "description": "Source that created/owns this monitor: DASHBOARD, CLI, TERRAFORM, MCP, or API", "enum": [ "DASHBOARD", "CLI", - "TERRAFORM" + "TERRAFORM", + "MCP", + "API" ] }, "createdAt": { @@ -27265,6 +27384,18 @@ "description": "Alert channel IDs linked to this monitor; populated on single-monitor responses", "format": "uuid" } + }, + "currentStatus": { + "type": "string", + "description": "Current operational state — UP, DOWN, DEGRADED, PAUSED, or UNKNOWN if no probe data yet", + "nullable": true, + "enum": [ + "up", + "degraded", + "down", + "paused", + "unknown" + ] } }, "description": "Full monitor representation" @@ -28455,6 +28586,18 @@ "$ref": "#/components/schemas/ResourceGroupMemberDto" } }, + "managedBy": { + "type": "string", + "description": "Source that created/owns this group: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on groups created before this attribution column existed.", + "nullable": true, + "enum": [ + "DASHBOARD", + "CLI", + "TERRAFORM", + "MCP", + "API" + ] + }, "createdAt": { "type": "string", "description": "Timestamp when the group was created", @@ -28715,6 +28858,7 @@ "up", "degraded", "down", + "paused", "unknown" ] }, @@ -31050,6 +31194,18 @@ "UNDER_MAINTENANCE" ] }, + "managedBy": { + "type": "string", + "description": "Source that created/owns this status page: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on pages created before this attribution column existed.", + "nullable": true, + "enum": [ + "DASHBOARD", + "CLI", + "TERRAFORM", + "MCP", + "API" + ] + }, "createdAt": { "type": "string", "format": "date-time" @@ -32993,6 +33149,18 @@ "$ref": "#/components/schemas/WebhookChannelConfig" } ] + }, + "managedBy": { + "type": "string", + "description": "New attribution source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value.", + "nullable": true, + "enum": [ + "DASHBOARD", + "CLI", + "TERRAFORM", + "MCP", + "API" + ] } } }, @@ -33233,7 +33401,7 @@ "properties": { "monitorId": { "type": "string", - "description": "Monitor to attach this maintenance window to; null preserves current", + "description": "Monitor this window applies to; null switches the window to org-wide", "format": "uuid", "nullable": true }, @@ -33251,17 +33419,19 @@ "maxLength": 100, "minLength": 0, "type": "string", - "description": "Updated iCal RRULE; null clears the repeat rule", + "description": "Reserved: iCal RRULE for recurring windows (stored but not yet honored); null clears it", "nullable": true }, "reason": { + "maxLength": 500, + "minLength": 0, "type": "string", - "description": "Updated reason; null clears the existing reason", + "description": "Updated reason (max 500 chars); null clears the existing reason", "nullable": true }, "suppressAlerts": { "type": "boolean", - "description": "Whether to suppress alerts; null preserves current", + "description": "Whether to suppress alerts during this window; null defaults to true", "nullable": true } } @@ -33345,12 +33515,14 @@ }, "managedBy": { "type": "string", - "description": "New management source; null preserves current", + "description": "New ownership source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value", "nullable": true, "enum": [ "DASHBOARD", "CLI", - "TERRAFORM" + "TERRAFORM", + "MCP", + "API" ] }, "environmentId": { @@ -33597,6 +33769,18 @@ "description": "Recovery cooldown in minutes; null clears", "format": "int32", "nullable": true + }, + "managedBy": { + "type": "string", + "description": "New attribution source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value.", + "nullable": true, + "enum": [ + "DASHBOARD", + "CLI", + "TERRAFORM", + "MCP", + "API" + ] } }, "description": "Request body for updating a resource group" @@ -33801,6 +33985,18 @@ "REVIEW", "AUTOMATIC" ] + }, + "managedBy": { + "type": "string", + "description": "New attribution source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value.", + "nullable": true, + "enum": [ + "DASHBOARD", + "CLI", + "TERRAFORM", + "MCP", + "API" + ] } } }, diff --git a/internal/generated/types.go b/internal/generated/types.go index cf4af53..a2f43a0 100644 --- a/internal/generated/types.go +++ b/internal/generated/types.go @@ -100,6 +100,33 @@ func (e AlertChannelDtoChannelType) Valid() bool { } } +// Defines values for AlertChannelDtoManagedBy. +const ( + AlertChannelDtoManagedByAPI AlertChannelDtoManagedBy = "API" + AlertChannelDtoManagedByCLI AlertChannelDtoManagedBy = "CLI" + AlertChannelDtoManagedByDASHBOARD AlertChannelDtoManagedBy = "DASHBOARD" + AlertChannelDtoManagedByMCP AlertChannelDtoManagedBy = "MCP" + AlertChannelDtoManagedByTERRAFORM AlertChannelDtoManagedBy = "TERRAFORM" +) + +// Valid indicates whether the value is a known member of the AlertChannelDtoManagedBy enum. +func (e AlertChannelDtoManagedBy) Valid() bool { + switch e { + case AlertChannelDtoManagedByAPI: + return true + case AlertChannelDtoManagedByCLI: + return true + case AlertChannelDtoManagedByDASHBOARD: + return true + case AlertChannelDtoManagedByMCP: + return true + case AlertChannelDtoManagedByTERRAFORM: + return true + default: + return false + } +} + // Defines values for AlertDeliveryDtoEventType. const ( INCIDENTCREATED AlertDeliveryDtoEventType = "INCIDENT_CREATED" @@ -475,6 +502,33 @@ func (e ConfirmationPolicyType) Valid() bool { } } +// Defines values for CreateAlertChannelRequestManagedBy. +const ( + CreateAlertChannelRequestManagedByAPI CreateAlertChannelRequestManagedBy = "API" + CreateAlertChannelRequestManagedByCLI CreateAlertChannelRequestManagedBy = "CLI" + CreateAlertChannelRequestManagedByDASHBOARD CreateAlertChannelRequestManagedBy = "DASHBOARD" + CreateAlertChannelRequestManagedByMCP CreateAlertChannelRequestManagedBy = "MCP" + CreateAlertChannelRequestManagedByTERRAFORM CreateAlertChannelRequestManagedBy = "TERRAFORM" +) + +// Valid indicates whether the value is a known member of the CreateAlertChannelRequestManagedBy enum. +func (e CreateAlertChannelRequestManagedBy) Valid() bool { + switch e { + case CreateAlertChannelRequestManagedByAPI: + return true + case CreateAlertChannelRequestManagedByCLI: + return true + case CreateAlertChannelRequestManagedByDASHBOARD: + return true + case CreateAlertChannelRequestManagedByMCP: + return true + case CreateAlertChannelRequestManagedByTERRAFORM: + return true + default: + return false + } +} + // Defines values for CreateAssertionRequestSeverity. const ( CreateAssertionRequestSeverityFail CreateAssertionRequestSeverity = "fail" @@ -537,18 +591,24 @@ func (e CreateManualIncidentRequestSeverity) Valid() bool { // Defines values for CreateMonitorRequestManagedBy. const ( + CreateMonitorRequestManagedByAPI CreateMonitorRequestManagedBy = "API" CreateMonitorRequestManagedByCLI CreateMonitorRequestManagedBy = "CLI" CreateMonitorRequestManagedByDASHBOARD CreateMonitorRequestManagedBy = "DASHBOARD" + CreateMonitorRequestManagedByMCP CreateMonitorRequestManagedBy = "MCP" CreateMonitorRequestManagedByTERRAFORM CreateMonitorRequestManagedBy = "TERRAFORM" ) // Valid indicates whether the value is a known member of the CreateMonitorRequestManagedBy enum. func (e CreateMonitorRequestManagedBy) Valid() bool { switch e { + case CreateMonitorRequestManagedByAPI: + return true case CreateMonitorRequestManagedByCLI: return true case CreateMonitorRequestManagedByDASHBOARD: return true + case CreateMonitorRequestManagedByMCP: + return true case CreateMonitorRequestManagedByTERRAFORM: return true default: @@ -604,6 +664,33 @@ func (e CreateResourceGroupRequestHealthThresholdType) Valid() bool { } } +// Defines values for CreateResourceGroupRequestManagedBy. +const ( + CreateResourceGroupRequestManagedByAPI CreateResourceGroupRequestManagedBy = "API" + CreateResourceGroupRequestManagedByCLI CreateResourceGroupRequestManagedBy = "CLI" + CreateResourceGroupRequestManagedByDASHBOARD CreateResourceGroupRequestManagedBy = "DASHBOARD" + CreateResourceGroupRequestManagedByMCP CreateResourceGroupRequestManagedBy = "MCP" + CreateResourceGroupRequestManagedByTERRAFORM CreateResourceGroupRequestManagedBy = "TERRAFORM" +) + +// Valid indicates whether the value is a known member of the CreateResourceGroupRequestManagedBy enum. +func (e CreateResourceGroupRequestManagedBy) Valid() bool { + switch e { + case CreateResourceGroupRequestManagedByAPI: + return true + case CreateResourceGroupRequestManagedByCLI: + return true + case CreateResourceGroupRequestManagedByDASHBOARD: + return true + case CreateResourceGroupRequestManagedByMCP: + return true + case CreateResourceGroupRequestManagedByTERRAFORM: + return true + default: + return false + } +} + // Defines values for CreateStatusPageComponentRequestType. const ( CreateStatusPageComponentRequestTypeGROUP CreateStatusPageComponentRequestType = "GROUP" @@ -718,6 +805,33 @@ func (e CreateStatusPageRequestIncidentMode) Valid() bool { } } +// Defines values for CreateStatusPageRequestManagedBy. +const ( + CreateStatusPageRequestManagedByAPI CreateStatusPageRequestManagedBy = "API" + CreateStatusPageRequestManagedByCLI CreateStatusPageRequestManagedBy = "CLI" + CreateStatusPageRequestManagedByDASHBOARD CreateStatusPageRequestManagedBy = "DASHBOARD" + CreateStatusPageRequestManagedByMCP CreateStatusPageRequestManagedBy = "MCP" + CreateStatusPageRequestManagedByTERRAFORM CreateStatusPageRequestManagedBy = "TERRAFORM" +) + +// Valid indicates whether the value is a known member of the CreateStatusPageRequestManagedBy enum. +func (e CreateStatusPageRequestManagedBy) Valid() bool { + switch e { + case CreateStatusPageRequestManagedByAPI: + return true + case CreateStatusPageRequestManagedByCLI: + return true + case CreateStatusPageRequestManagedByDASHBOARD: + return true + case CreateStatusPageRequestManagedByMCP: + return true + case CreateStatusPageRequestManagedByTERRAFORM: + return true + default: + return false + } +} + // Defines values for CreateStatusPageRequestVisibility. const ( CreateStatusPageRequestVisibilityIPRESTRICTED CreateStatusPageRequestVisibility = "IP_RESTRICTED" @@ -1086,13 +1200,13 @@ func (e DnsTxtContainsAssertionType) Valid() bool { // Defines values for EmailChannelConfigChannelType. const ( - Email EmailChannelConfigChannelType = "email" + EmailChannelConfigChannelTypeEmail EmailChannelConfigChannelType = "email" ) // Valid indicates whether the value is a known member of the EmailChannelConfigChannelType enum. func (e EmailChannelConfigChannelType) Valid() bool { switch e { - case Email: + case EmailChannelConfigChannelTypeEmail: return true default: return false @@ -2176,20 +2290,53 @@ func (e MonitorAuthDtoAuthType) Valid() bool { } } +// Defines values for MonitorDtoCurrentStatus. +const ( + MonitorDtoCurrentStatusDegraded MonitorDtoCurrentStatus = "degraded" + MonitorDtoCurrentStatusDown MonitorDtoCurrentStatus = "down" + MonitorDtoCurrentStatusPaused MonitorDtoCurrentStatus = "paused" + MonitorDtoCurrentStatusUnknown MonitorDtoCurrentStatus = "unknown" + MonitorDtoCurrentStatusUp MonitorDtoCurrentStatus = "up" +) + +// Valid indicates whether the value is a known member of the MonitorDtoCurrentStatus enum. +func (e MonitorDtoCurrentStatus) Valid() bool { + switch e { + case MonitorDtoCurrentStatusDegraded: + return true + case MonitorDtoCurrentStatusDown: + return true + case MonitorDtoCurrentStatusPaused: + return true + case MonitorDtoCurrentStatusUnknown: + return true + case MonitorDtoCurrentStatusUp: + return true + default: + return false + } +} + // Defines values for MonitorDtoManagedBy. const ( + MonitorDtoManagedByAPI MonitorDtoManagedBy = "API" MonitorDtoManagedByCLI MonitorDtoManagedBy = "CLI" MonitorDtoManagedByDASHBOARD MonitorDtoManagedBy = "DASHBOARD" + MonitorDtoManagedByMCP MonitorDtoManagedBy = "MCP" MonitorDtoManagedByTERRAFORM MonitorDtoManagedBy = "TERRAFORM" ) // Valid indicates whether the value is a known member of the MonitorDtoManagedBy enum. func (e MonitorDtoManagedBy) Valid() bool { switch e { + case MonitorDtoManagedByAPI: + return true case MonitorDtoManagedByCLI: return true case MonitorDtoManagedByDASHBOARD: return true + case MonitorDtoManagedByMCP: + return true case MonitorDtoManagedByTERRAFORM: return true default: @@ -2533,6 +2680,33 @@ func (e ResourceGroupDtoHealthThresholdType) Valid() bool { } } +// Defines values for ResourceGroupDtoManagedBy. +const ( + ResourceGroupDtoManagedByAPI ResourceGroupDtoManagedBy = "API" + ResourceGroupDtoManagedByCLI ResourceGroupDtoManagedBy = "CLI" + ResourceGroupDtoManagedByDASHBOARD ResourceGroupDtoManagedBy = "DASHBOARD" + ResourceGroupDtoManagedByMCP ResourceGroupDtoManagedBy = "MCP" + ResourceGroupDtoManagedByTERRAFORM ResourceGroupDtoManagedBy = "TERRAFORM" +) + +// Valid indicates whether the value is a known member of the ResourceGroupDtoManagedBy enum. +func (e ResourceGroupDtoManagedBy) Valid() bool { + switch e { + case ResourceGroupDtoManagedByAPI: + return true + case ResourceGroupDtoManagedByCLI: + return true + case ResourceGroupDtoManagedByDASHBOARD: + return true + case ResourceGroupDtoManagedByMCP: + return true + case ResourceGroupDtoManagedByTERRAFORM: + return true + default: + return false + } +} + // Defines values for ResourceGroupHealthDtoStatus. const ( ResourceGroupHealthDtoStatusDegraded ResourceGroupHealthDtoStatus = "degraded" @@ -2651,6 +2825,7 @@ func (e ResponseTimeWarnAssertionType) Valid() bool { const ( ResultSummaryDtoCurrentStatusDegraded ResultSummaryDtoCurrentStatus = "degraded" ResultSummaryDtoCurrentStatusDown ResultSummaryDtoCurrentStatus = "down" + ResultSummaryDtoCurrentStatusPaused ResultSummaryDtoCurrentStatus = "paused" ResultSummaryDtoCurrentStatusUnknown ResultSummaryDtoCurrentStatus = "unknown" ResultSummaryDtoCurrentStatusUp ResultSummaryDtoCurrentStatus = "up" ) @@ -2662,6 +2837,8 @@ func (e ResultSummaryDtoCurrentStatus) Valid() bool { return true case ResultSummaryDtoCurrentStatusDown: return true + case ResultSummaryDtoCurrentStatusPaused: + return true case ResultSummaryDtoCurrentStatusUnknown: return true case ResultSummaryDtoCurrentStatusUp: @@ -2905,6 +3082,33 @@ func (e StatusPageDtoIncidentMode) Valid() bool { } } +// Defines values for StatusPageDtoManagedBy. +const ( + StatusPageDtoManagedByAPI StatusPageDtoManagedBy = "API" + StatusPageDtoManagedByCLI StatusPageDtoManagedBy = "CLI" + StatusPageDtoManagedByDASHBOARD StatusPageDtoManagedBy = "DASHBOARD" + StatusPageDtoManagedByMCP StatusPageDtoManagedBy = "MCP" + StatusPageDtoManagedByTERRAFORM StatusPageDtoManagedBy = "TERRAFORM" +) + +// Valid indicates whether the value is a known member of the StatusPageDtoManagedBy enum. +func (e StatusPageDtoManagedBy) Valid() bool { + switch e { + case StatusPageDtoManagedByAPI: + return true + case StatusPageDtoManagedByCLI: + return true + case StatusPageDtoManagedByDASHBOARD: + return true + case StatusPageDtoManagedByMCP: + return true + case StatusPageDtoManagedByTERRAFORM: + return true + default: + return false + } +} + // Defines values for StatusPageDtoOverallStatus. const ( StatusPageDtoOverallStatusDEGRADEDPERFORMANCE StatusPageDtoOverallStatus = "DEGRADED_PERFORMANCE" @@ -3189,16 +3393,16 @@ func (e TriggerRuleScope) Valid() bool { // Defines values for TriggerRuleSeverity. const ( - Degraded TriggerRuleSeverity = "degraded" - Down TriggerRuleSeverity = "down" + TriggerRuleSeverityDegraded TriggerRuleSeverity = "degraded" + TriggerRuleSeverityDown TriggerRuleSeverity = "down" ) // Valid indicates whether the value is a known member of the TriggerRuleSeverity enum. func (e TriggerRuleSeverity) Valid() bool { switch e { - case Degraded: + case TriggerRuleSeverityDegraded: return true - case Down: + case TriggerRuleSeverityDown: return true default: return false @@ -3226,6 +3430,33 @@ func (e TriggerRuleType) Valid() bool { } } +// Defines values for UpdateAlertChannelRequestManagedBy. +const ( + UpdateAlertChannelRequestManagedByAPI UpdateAlertChannelRequestManagedBy = "API" + UpdateAlertChannelRequestManagedByCLI UpdateAlertChannelRequestManagedBy = "CLI" + UpdateAlertChannelRequestManagedByDASHBOARD UpdateAlertChannelRequestManagedBy = "DASHBOARD" + UpdateAlertChannelRequestManagedByMCP UpdateAlertChannelRequestManagedBy = "MCP" + UpdateAlertChannelRequestManagedByTERRAFORM UpdateAlertChannelRequestManagedBy = "TERRAFORM" +) + +// Valid indicates whether the value is a known member of the UpdateAlertChannelRequestManagedBy enum. +func (e UpdateAlertChannelRequestManagedBy) Valid() bool { + switch e { + case UpdateAlertChannelRequestManagedByAPI: + return true + case UpdateAlertChannelRequestManagedByCLI: + return true + case UpdateAlertChannelRequestManagedByDASHBOARD: + return true + case UpdateAlertChannelRequestManagedByMCP: + return true + case UpdateAlertChannelRequestManagedByTERRAFORM: + return true + default: + return false + } +} + // Defines values for UpdateAssertionRequestSeverity. const ( Fail UpdateAssertionRequestSeverity = "fail" @@ -3246,18 +3477,24 @@ func (e UpdateAssertionRequestSeverity) Valid() bool { // Defines values for UpdateMonitorRequestManagedBy. const ( + UpdateMonitorRequestManagedByAPI UpdateMonitorRequestManagedBy = "API" UpdateMonitorRequestManagedByCLI UpdateMonitorRequestManagedBy = "CLI" UpdateMonitorRequestManagedByDASHBOARD UpdateMonitorRequestManagedBy = "DASHBOARD" + UpdateMonitorRequestManagedByMCP UpdateMonitorRequestManagedBy = "MCP" UpdateMonitorRequestManagedByTERRAFORM UpdateMonitorRequestManagedBy = "TERRAFORM" ) // Valid indicates whether the value is a known member of the UpdateMonitorRequestManagedBy enum. func (e UpdateMonitorRequestManagedBy) Valid() bool { switch e { + case UpdateMonitorRequestManagedByAPI: + return true case UpdateMonitorRequestManagedByCLI: return true case UpdateMonitorRequestManagedByDASHBOARD: return true + case UpdateMonitorRequestManagedByMCP: + return true case UpdateMonitorRequestManagedByTERRAFORM: return true default: @@ -3283,6 +3520,33 @@ func (e UpdateResourceGroupRequestHealthThresholdType) Valid() bool { } } +// Defines values for UpdateResourceGroupRequestManagedBy. +const ( + UpdateResourceGroupRequestManagedByAPI UpdateResourceGroupRequestManagedBy = "API" + UpdateResourceGroupRequestManagedByCLI UpdateResourceGroupRequestManagedBy = "CLI" + UpdateResourceGroupRequestManagedByDASHBOARD UpdateResourceGroupRequestManagedBy = "DASHBOARD" + UpdateResourceGroupRequestManagedByMCP UpdateResourceGroupRequestManagedBy = "MCP" + UpdateResourceGroupRequestManagedByTERRAFORM UpdateResourceGroupRequestManagedBy = "TERRAFORM" +) + +// Valid indicates whether the value is a known member of the UpdateResourceGroupRequestManagedBy enum. +func (e UpdateResourceGroupRequestManagedBy) Valid() bool { + switch e { + case UpdateResourceGroupRequestManagedByAPI: + return true + case UpdateResourceGroupRequestManagedByCLI: + return true + case UpdateResourceGroupRequestManagedByDASHBOARD: + return true + case UpdateResourceGroupRequestManagedByMCP: + return true + case UpdateResourceGroupRequestManagedByTERRAFORM: + return true + default: + return false + } +} + // Defines values for UpdateStatusPageIncidentRequestImpact. const ( UpdateStatusPageIncidentRequestImpactCRITICAL UpdateStatusPageIncidentRequestImpact = "CRITICAL" @@ -3352,6 +3616,33 @@ func (e UpdateStatusPageRequestIncidentMode) Valid() bool { } } +// Defines values for UpdateStatusPageRequestManagedBy. +const ( + UpdateStatusPageRequestManagedByAPI UpdateStatusPageRequestManagedBy = "API" + UpdateStatusPageRequestManagedByCLI UpdateStatusPageRequestManagedBy = "CLI" + UpdateStatusPageRequestManagedByDASHBOARD UpdateStatusPageRequestManagedBy = "DASHBOARD" + UpdateStatusPageRequestManagedByMCP UpdateStatusPageRequestManagedBy = "MCP" + UpdateStatusPageRequestManagedByTERRAFORM UpdateStatusPageRequestManagedBy = "TERRAFORM" +) + +// Valid indicates whether the value is a known member of the UpdateStatusPageRequestManagedBy enum. +func (e UpdateStatusPageRequestManagedBy) Valid() bool { + switch e { + case UpdateStatusPageRequestManagedByAPI: + return true + case UpdateStatusPageRequestManagedByCLI: + return true + case UpdateStatusPageRequestManagedByDASHBOARD: + return true + case UpdateStatusPageRequestManagedByMCP: + return true + case UpdateStatusPageRequestManagedByTERRAFORM: + return true + default: + return false + } +} + // Defines values for UpdateStatusPageRequestVisibility. const ( IPRESTRICTED UpdateStatusPageRequestVisibility = "IP_RESTRICTED" @@ -3433,6 +3724,66 @@ func (e WebhookChannelConfigChannelType) Valid() bool { } } +// Defines values for List14ParamsType. +const ( + List14ParamsTypeDiscord List14ParamsType = "discord" + List14ParamsTypeEmail List14ParamsType = "email" + List14ParamsTypeOpsgenie List14ParamsType = "opsgenie" + List14ParamsTypePagerduty List14ParamsType = "pagerduty" + List14ParamsTypeSlack List14ParamsType = "slack" + List14ParamsTypeTeams List14ParamsType = "teams" + List14ParamsTypeWebhook List14ParamsType = "webhook" +) + +// Valid indicates whether the value is a known member of the List14ParamsType enum. +func (e List14ParamsType) Valid() bool { + switch e { + case List14ParamsTypeDiscord: + return true + case List14ParamsTypeEmail: + return true + case List14ParamsTypeOpsgenie: + return true + case List14ParamsTypePagerduty: + return true + case List14ParamsTypeSlack: + return true + case List14ParamsTypeTeams: + return true + case List14ParamsTypeWebhook: + return true + default: + return false + } +} + +// Defines values for List14ParamsManagedBy. +const ( + List14ParamsManagedByAPI List14ParamsManagedBy = "API" + List14ParamsManagedByCLI List14ParamsManagedBy = "CLI" + List14ParamsManagedByDASHBOARD List14ParamsManagedBy = "DASHBOARD" + List14ParamsManagedByMCP List14ParamsManagedBy = "MCP" + List14ParamsManagedByTERRAFORM List14ParamsManagedBy = "TERRAFORM" +) + +// Valid indicates whether the value is a known member of the List14ParamsManagedBy enum. +func (e List14ParamsManagedBy) Valid() bool { + switch e { + case List14ParamsManagedByAPI: + return true + case List14ParamsManagedByCLI: + return true + case List14ParamsManagedByDASHBOARD: + return true + case List14ParamsManagedByMCP: + return true + case List14ParamsManagedByTERRAFORM: + return true + default: + return false + } +} + // Defines values for List8ParamsType. const ( List8ParamsTypeDNS List8ParamsType = "DNS" @@ -3465,18 +3816,24 @@ func (e List8ParamsType) Valid() bool { // Defines values for List8ParamsManagedBy. const ( + API List8ParamsManagedBy = "API" CLI List8ParamsManagedBy = "CLI" DASHBOARD List8ParamsManagedBy = "DASHBOARD" + MCP List8ParamsManagedBy = "MCP" TERRAFORM List8ParamsManagedBy = "TERRAFORM" ) // Valid indicates whether the value is a known member of the List8ParamsManagedBy enum. func (e List8ParamsManagedBy) Valid() bool { switch e { + case API: + return true case CLI: return true case DASHBOARD: return true + case MCP: + return true case TERRAFORM: return true default: @@ -3820,6 +4177,9 @@ type AlertChannelDto struct { // LastDeliveryStatus Outcome of the most recent delivery (SUCCESS, FAILED, etc.) LastDeliveryStatus *string `json:"lastDeliveryStatus,omitempty"` + // ManagedBy Source that created/owns this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on channels created before this attribution column existed. + ManagedBy *AlertChannelDtoManagedBy `json:"managedBy,omitempty"` + // Name Human-readable channel name Name string `json:"name"` @@ -3830,6 +4190,9 @@ type AlertChannelDto struct { // AlertChannelDtoChannelType Channel integration type (e.g. SLACK, PAGERDUTY, EMAIL) type AlertChannelDtoChannelType string +// AlertChannelDtoManagedBy Source that created/owns this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on channels created before this attribution column existed. +type AlertChannelDtoManagedBy string + // AlertDeliveryDto Delivery record for a single channel within a notification dispatch type AlertDeliveryDto struct { // AttemptCount Number of delivery attempts made @@ -4334,6 +4697,9 @@ type ConfirmationPolicyType string type CreateAlertChannelRequest struct { Config CreateAlertChannelRequest_Config `json:"config"` + // ManagedBy Source creating this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted. + ManagedBy *CreateAlertChannelRequestManagedBy `json:"managedBy,omitempty"` + // Name Human-readable name for this alert channel Name string `json:"name"` } @@ -4343,6 +4709,9 @@ type CreateAlertChannelRequest_Config struct { union json.RawMessage } +// CreateAlertChannelRequestManagedBy Source creating this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted. +type CreateAlertChannelRequestManagedBy string + // CreateApiKeyRequest defines model for CreateApiKeyRequest. type CreateApiKeyRequest struct { // ExpiresAt Optional expiration timestamp in ISO 8601 format @@ -4403,10 +4772,10 @@ type CreateMaintenanceWindowRequest struct { // MonitorId Monitor to attach this maintenance window to; null for org-wide MonitorId *openapi_types.UUID `json:"monitorId,omitempty"` - // Reason Human-readable reason for the maintenance + // Reason Human-readable reason for the maintenance (max 500 chars) Reason *string `json:"reason,omitempty"` - // RepeatRule iCal RRULE for recurring windows (max 100 chars); null for one-time + // RepeatRule Reserved: iCal RRULE for recurring windows (stored but not yet honored) RepeatRule *string `json:"repeatRule,omitempty"` // StartsAt Scheduled start of the maintenance window (ISO 8601) @@ -4454,8 +4823,8 @@ type CreateMonitorRequest struct { FrequencySeconds *int32 `json:"frequencySeconds,omitempty"` IncidentPolicy *UpdateIncidentPolicyRequest `json:"incidentPolicy,omitempty"` - // ManagedBy Who manages this monitor: DASHBOARD or CLI - ManagedBy CreateMonitorRequestManagedBy `json:"managedBy"` + // ManagedBy Source that created/owns this monitor: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted; set to your surface so audit logs, drift detection, and analytics attribute correctly. + ManagedBy *CreateMonitorRequestManagedBy `json:"managedBy,omitempty"` // Name Human-readable name for this monitor Name string `json:"name"` @@ -4473,7 +4842,7 @@ type CreateMonitorRequest_Config struct { union json.RawMessage } -// CreateMonitorRequestManagedBy Who manages this monitor: DASHBOARD or CLI +// CreateMonitorRequestManagedBy Source that created/owns this monitor: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted; set to your surface so audit logs, drift detection, and analytics attribute correctly. type CreateMonitorRequestManagedBy string // CreateMonitorRequestType Monitor protocol type @@ -4527,6 +4896,9 @@ type CreateResourceGroupRequest struct { // HealthThresholdValue Health threshold value: count (0+) or percentage (0–100) HealthThresholdValue *float32 `json:"healthThresholdValue,omitempty"` + // ManagedBy Source creating this group: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted. + ManagedBy *CreateResourceGroupRequestManagedBy `json:"managedBy,omitempty"` + // Name Human-readable name for this group Name string `json:"name"` @@ -4540,6 +4912,9 @@ type CreateResourceGroupRequest struct { // CreateResourceGroupRequestHealthThresholdType Health threshold type: COUNT or PERCENTAGE type CreateResourceGroupRequestHealthThresholdType string +// CreateResourceGroupRequestManagedBy Source creating this group: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted. +type CreateResourceGroupRequestManagedBy string + // CreateSecretRequest defines model for CreateSecretRequest. type CreateSecretRequest struct { // Key Unique secret key within the workspace (max 255 chars) @@ -4670,6 +5045,9 @@ type CreateStatusPageRequest struct { // IncidentMode Incident mode: MANUAL, REVIEW, or AUTOMATIC (default: AUTOMATIC) IncidentMode *CreateStatusPageRequestIncidentMode `json:"incidentMode,omitempty"` + // ManagedBy Source creating this page: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted. + ManagedBy *CreateStatusPageRequestManagedBy `json:"managedBy,omitempty"` + // Name Human-readable name for this status page Name string `json:"name"` @@ -4683,6 +5061,9 @@ type CreateStatusPageRequest struct { // CreateStatusPageRequestIncidentMode Incident mode: MANUAL, REVIEW, or AUTOMATIC (default: AUTOMATIC) type CreateStatusPageRequestIncidentMode string +// CreateStatusPageRequestManagedBy Source creating this page: DASHBOARD, CLI, TERRAFORM, MCP, or API. Defaults to API when omitted. +type CreateStatusPageRequestManagedBy string + // CreateStatusPageRequestVisibility Page visibility: PUBLIC, PASSWORD, or IP_RESTRICTED (default: PUBLIC) type CreateStatusPageRequestVisibility string @@ -5873,7 +6254,7 @@ type MaintenanceWindowDto struct { // Reason Human-readable reason for the maintenance Reason *string `json:"reason,omitempty"` - // RepeatRule iCal RRULE for recurring windows; null for one-time + // RepeatRule Reserved: iCal RRULE for recurring windows (stored but not yet honored) RepeatRule *string `json:"repeatRule,omitempty"` // StartsAt Scheduled start of the maintenance window @@ -6123,6 +6504,9 @@ type MonitorDto struct { // CreatedAt Timestamp when the monitor was created CreatedAt time.Time `json:"createdAt"` + // CurrentStatus Current operational state — UP, DOWN, DEGRADED, PAUSED, or UNKNOWN if no probe data yet + CurrentStatus *MonitorDtoCurrentStatus `json:"currentStatus,omitempty"` + // Enabled Whether the monitor is active Enabled bool `json:"enabled"` Environment *Summary `json:"environment,omitempty"` @@ -6134,7 +6518,7 @@ type MonitorDto struct { Id openapi_types.UUID `json:"id"` IncidentPolicy *IncidentPolicyDto `json:"incidentPolicy,omitempty"` - // ManagedBy Management source: DASHBOARD or CLI + // ManagedBy Source that created/owns this monitor: DASHBOARD, CLI, TERRAFORM, MCP, or API ManagedBy MonitorDtoManagedBy `json:"managedBy"` // Name Human-readable name for this monitor @@ -6162,7 +6546,10 @@ type MonitorDto_Config struct { union json.RawMessage } -// MonitorDtoManagedBy Management source: DASHBOARD or CLI +// MonitorDtoCurrentStatus Current operational state — UP, DOWN, DEGRADED, PAUSED, or UNKNOWN if no probe data yet +type MonitorDtoCurrentStatus string + +// MonitorDtoManagedBy Source that created/owns this monitor: DASHBOARD, CLI, TERRAFORM, MCP, or API type MonitorDtoManagedBy string // MonitorDtoType defines model for MonitorDto.Type. @@ -6685,6 +7072,9 @@ type ResourceGroupDto struct { // Id Unique resource group identifier Id openapi_types.UUID `json:"id"` + // ManagedBy Source that created/owns this group: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on groups created before this attribution column existed. + ManagedBy *ResourceGroupDtoManagedBy `json:"managedBy,omitempty"` + // Members Member list with individual statuses; populated on detail GET only Members *[]ResourceGroupMemberDto `json:"members,omitempty"` @@ -6710,6 +7100,9 @@ type ResourceGroupDto struct { // ResourceGroupDtoHealthThresholdType Health threshold type: COUNT or PERCENTAGE type ResourceGroupDtoHealthThresholdType string +// ResourceGroupDtoManagedBy Source that created/owns this group: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on groups created before this attribution column existed. +type ResourceGroupDtoManagedBy string + // ResourceGroupHealthDto Aggregated health summary for a resource group type ResourceGroupHealthDto struct { // ActiveIncidents Number of members with an active incident or non-operational status @@ -7758,13 +8151,16 @@ type StatusPageCustomDomainDtoVerificationMethod string // StatusPageDto defines model for StatusPageDto. type StatusPageDto struct { // Branding Updated branding configuration; null preserves current - Branding StatusPageBranding `json:"branding"` - ComponentCount *int32 `json:"componentCount,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Description *string `json:"description,omitempty"` - Enabled bool `json:"enabled"` - Id openapi_types.UUID `json:"id"` - IncidentMode StatusPageDtoIncidentMode `json:"incidentMode"` + Branding StatusPageBranding `json:"branding"` + ComponentCount *int32 `json:"componentCount,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description,omitempty"` + Enabled bool `json:"enabled"` + Id openapi_types.UUID `json:"id"` + IncidentMode StatusPageDtoIncidentMode `json:"incidentMode"` + + // ManagedBy Source that created/owns this status page: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on pages created before this attribution column existed. + ManagedBy *StatusPageDtoManagedBy `json:"managedBy,omitempty"` Name string `json:"name"` OrganizationId int32 `json:"organizationId"` OverallStatus *StatusPageDtoOverallStatus `json:"overallStatus,omitempty"` @@ -7778,6 +8174,9 @@ type StatusPageDto struct { // StatusPageDtoIncidentMode defines model for StatusPageDto.IncidentMode. type StatusPageDtoIncidentMode string +// StatusPageDtoManagedBy Source that created/owns this status page: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on pages created before this attribution column existed. +type StatusPageDtoManagedBy string + // StatusPageDtoOverallStatus defines model for StatusPageDto.OverallStatus. type StatusPageDtoOverallStatus string @@ -8425,6 +8824,9 @@ type TriggerRuleType string type UpdateAlertChannelRequest struct { Config UpdateAlertChannelRequest_Config `json:"config"` + // ManagedBy New attribution source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value. + ManagedBy *UpdateAlertChannelRequestManagedBy `json:"managedBy,omitempty"` + // Name New channel name (full replacement, not partial update) Name string `json:"name"` } @@ -8434,6 +8836,9 @@ type UpdateAlertChannelRequest_Config struct { union json.RawMessage } +// UpdateAlertChannelRequestManagedBy New attribution source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value. +type UpdateAlertChannelRequestManagedBy string + // UpdateAlertSensitivityRequest Request body for updating alert sensitivity on a service subscription type UpdateAlertSensitivityRequest struct { // AlertSensitivity Alert sensitivity: ALL (any status change), INCIDENTS_ONLY (real vendor incidents, default), MAJOR_ONLY (only DOWN-level incidents) @@ -8491,19 +8896,19 @@ type UpdateMaintenanceWindowRequest struct { // EndsAt Updated end time (ISO 8601) EndsAt time.Time `json:"endsAt"` - // MonitorId Monitor to attach this maintenance window to; null preserves current + // MonitorId Monitor this window applies to; null switches the window to org-wide MonitorId *openapi_types.UUID `json:"monitorId,omitempty"` - // Reason Updated reason; null clears the existing reason + // Reason Updated reason (max 500 chars); null clears the existing reason Reason *string `json:"reason,omitempty"` - // RepeatRule Updated iCal RRULE; null clears the repeat rule + // RepeatRule Reserved: iCal RRULE for recurring windows (stored but not yet honored); null clears it RepeatRule *string `json:"repeatRule,omitempty"` // StartsAt Updated start time (ISO 8601) StartsAt time.Time `json:"startsAt"` - // SuppressAlerts Whether to suppress alerts; null preserves current + // SuppressAlerts Whether to suppress alerts during this window; null defaults to true SuppressAlerts *bool `json:"suppressAlerts,omitempty"` } @@ -8543,7 +8948,7 @@ type UpdateMonitorRequest struct { FrequencySeconds *int32 `json:"frequencySeconds,omitempty"` IncidentPolicy *UpdateIncidentPolicyRequest `json:"incidentPolicy,omitempty"` - // ManagedBy New management source; null preserves current + // ManagedBy New ownership source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value ManagedBy *UpdateMonitorRequestManagedBy `json:"managedBy,omitempty"` // Name New monitor name; null preserves current @@ -8559,7 +8964,7 @@ type UpdateMonitorRequest_Config struct { union json.RawMessage } -// UpdateMonitorRequestManagedBy New management source; null preserves current +// UpdateMonitorRequestManagedBy New ownership source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value type UpdateMonitorRequestManagedBy string // UpdateNotificationPolicyRequest Request body for updating a notification policy (null fields are preserved) @@ -8626,6 +9031,9 @@ type UpdateResourceGroupRequest struct { // HealthThresholdValue Health threshold value; null disables threshold HealthThresholdValue *float32 `json:"healthThresholdValue,omitempty"` + // ManagedBy New attribution source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value. + ManagedBy *UpdateResourceGroupRequestManagedBy `json:"managedBy,omitempty"` + // Name Human-readable name for this group Name string `json:"name"` @@ -8639,6 +9047,9 @@ type UpdateResourceGroupRequest struct { // UpdateResourceGroupRequestHealthThresholdType Health threshold type: COUNT or PERCENTAGE; null disables threshold type UpdateResourceGroupRequestHealthThresholdType string +// UpdateResourceGroupRequestManagedBy New attribution source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value. +type UpdateResourceGroupRequestManagedBy string + // UpdateSecretRequest defines model for UpdateSecretRequest. type UpdateSecretRequest struct { // Value New secret value, stored encrypted (max 32KB) @@ -8727,6 +9138,9 @@ type UpdateStatusPageRequest struct { // IncidentMode Incident mode: MANUAL, REVIEW, or AUTOMATIC; null preserves current IncidentMode *UpdateStatusPageRequestIncidentMode `json:"incidentMode,omitempty"` + // ManagedBy New attribution source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value. + ManagedBy *UpdateStatusPageRequestManagedBy `json:"managedBy,omitempty"` + // Name New name; null preserves current Name *string `json:"name,omitempty"` @@ -8737,6 +9151,9 @@ type UpdateStatusPageRequest struct { // UpdateStatusPageRequestIncidentMode Incident mode: MANUAL, REVIEW, or AUTOMATIC; null preserves current type UpdateStatusPageRequestIncidentMode string +// UpdateStatusPageRequestManagedBy New attribution source: DASHBOARD, CLI, TERRAFORM, MCP, or API; null preserves current value. +type UpdateStatusPageRequestManagedBy string + // UpdateStatusPageRequestVisibility Page visibility; null preserves current type UpdateStatusPageRequestVisibility string @@ -8923,9 +9340,23 @@ type WorkspaceDto struct { // List14Params defines parameters for List14. type List14Params struct { + // Type Filter by channel integration type (e.g. SLACK, WEBHOOK, EMAIL) + Type *List14ParamsType `form:"type,omitempty" json:"type,omitempty"` + + // ManagedBy Filter by managed-by source (DASHBOARD, CLI, TERRAFORM, MCP, API) + ManagedBy *List14ParamsManagedBy `form:"managedBy,omitempty" json:"managedBy,omitempty"` + + // Search Case-insensitive contains-match on the channel name + Search *string `form:"search,omitempty" json:"search,omitempty"` Pageable Pageable `form:"pageable" json:"pageable"` } +// List14ParamsType defines parameters for List14. +type List14ParamsType string + +// List14ParamsManagedBy defines parameters for List14. +type List14ParamsManagedBy string + // List19Params defines parameters for List19. type List19Params struct { Action *string `form:"action,omitempty" json:"action,omitempty"` @@ -8981,18 +9412,24 @@ type List17Params struct { // List8Params defines parameters for List8. type List8Params struct { - // Enabled Filter by enabled state + // Enabled Filter by enabled state (true/false) Enabled *bool `form:"enabled,omitempty" json:"enabled,omitempty"` + // Status Lifecycle status alias: 'active' (enabled=true) or 'paused' (enabled=false). Ignored when ?enabled is also supplied. + Status *string `form:"status,omitempty" json:"status,omitempty"` + // Type Filter by monitor type Type *List8ParamsType `form:"type,omitempty" json:"type,omitempty"` // ManagedBy Filter by managed-by source ManagedBy *List8ParamsManagedBy `form:"managedBy,omitempty" json:"managedBy,omitempty"` - // Tags Filter by tag names, comma-separated (e.g. prod,critical) + // Tags Filter by tag names, comma-separated (e.g. prod,critical); OR semantics Tags *string `form:"tags,omitempty" json:"tags,omitempty"` + // Tag Filter by a single tag name (alias for ?tags=); merged with ?tags using OR semantics + Tag *string `form:"tag,omitempty" json:"tag,omitempty"` + // Search Case-insensitive name search Search *string `form:"search,omitempty" json:"search,omitempty"` diff --git a/internal/provider/resources/alert_channel.go b/internal/provider/resources/alert_channel.go index ab5b6e9..d8ef039 100644 --- a/internal/provider/resources/alert_channel.go +++ b/internal/provider/resources/alert_channel.go @@ -175,7 +175,7 @@ func (r *AlertChannelResource) buildConfig(model *AlertChannelResourceModel) (js } case generated.AlertChannelDtoChannelTypeEmail: cfg = generated.EmailChannelConfig{ - ChannelType: generated.Email, + ChannelType: generated.EmailChannelConfigChannelTypeEmail, Recipients: emailsFromStringList(model.Recipients), } case generated.AlertChannelDtoChannelTypePagerduty: @@ -228,9 +228,11 @@ func (r *AlertChannelResource) Create(ctx context.Context, req resource.CreateRe return } + managedByTF := generated.CreateAlertChannelRequestManagedByTERRAFORM body := generated.CreateAlertChannelRequest{ - Name: plan.Name.ValueString(), - Config: configUnion, + Name: plan.Name.ValueString(), + Config: configUnion, + ManagedBy: &managedByTF, } ch, err := api.Create[generated.AlertChannelDto](ctx, r.client, api.PathAlertChannels, body) @@ -306,9 +308,11 @@ func (r *AlertChannelResource) Update(ctx context.Context, req resource.UpdateRe return } + managedByTF := generated.UpdateAlertChannelRequestManagedByTERRAFORM body := generated.UpdateAlertChannelRequest{ - Name: plan.Name.ValueString(), - Config: configUnion, + Name: plan.Name.ValueString(), + Config: configUnion, + ManagedBy: &managedByTF, } ch, err := api.Update[generated.AlertChannelDto](ctx, r.client, api.AlertChannelPath(state.ID.ValueString()), body) diff --git a/internal/provider/resources/monitor.go b/internal/provider/resources/monitor.go index 3be71c7..ed04cbd 100644 --- a/internal/provider/resources/monitor.go +++ b/internal/provider/resources/monitor.go @@ -288,8 +288,8 @@ func (r *MonitorResource) Schema(_ context.Context, _ resource.SchemaRequest, re Description: "Incident severity: down or degraded", Validators: []validator.String{ stringvalidator.OneOf( - string(generated.Down), - string(generated.Degraded), + string(generated.TriggerRuleSeverityDown), + string(generated.TriggerRuleSeverityDegraded), ), }, }, @@ -828,11 +828,12 @@ func (r *MonitorResource) buildCreateRequest(ctx context.Context, plan *MonitorR return nil, err } + managedByTF := generated.CreateMonitorRequestManagedByTERRAFORM req := &generated.CreateMonitorRequest{ Name: plan.Name.ValueString(), Type: monitorType, Config: configUnion, - ManagedBy: generated.CreateMonitorRequestManagedByTERRAFORM, + ManagedBy: &managedByTF, FrequencySeconds: int32PtrOrNil(plan.FrequencySeconds), Enabled: boolPtrOrNil(plan.Enabled), Regions: stringSliceToPtr(plan.Regions), diff --git a/internal/provider/resources/monitor_test.go b/internal/provider/resources/monitor_test.go index 4034dfd..62826a8 100644 --- a/internal/provider/resources/monitor_test.go +++ b/internal/provider/resources/monitor_test.go @@ -77,8 +77,8 @@ func TestBuildCreateRequest_PopulatesEveryRequiredField(t *testing.T) { if body.Type != "HTTP" { t.Errorf("Type = %q", body.Type) } - if body.ManagedBy != "TERRAFORM" { - t.Errorf("ManagedBy = %q, want TERRAFORM (provider must self-identify so a future round-trip survives a manual dashboard edit detection)", body.ManagedBy) + if body.ManagedBy == nil || *body.ManagedBy != "TERRAFORM" { + t.Errorf("ManagedBy = %v, want TERRAFORM (provider must self-identify so a future round-trip survives a manual dashboard edit detection)", body.ManagedBy) } if body.FrequencySeconds == nil || *body.FrequencySeconds != 60 { t.Errorf("FrequencySeconds = %v, want 60", body.FrequencySeconds) diff --git a/internal/provider/resources/resource_group.go b/internal/provider/resources/resource_group.go index 678cb85..c088f43 100644 --- a/internal/provider/resources/resource_group.go +++ b/internal/provider/resources/resource_group.go @@ -181,6 +181,7 @@ func (r *ResourceGroupResource) buildRequest(ctx context.Context, plan *Resource if diags.HasError() { return generated.CreateResourceGroupRequest{}, diags } + managedByTF := generated.CreateResourceGroupRequestManagedByTERRAFORM return generated.CreateResourceGroupRequest{ Name: plan.Name.ValueString(), Description: stringPtrOrNil(plan.Description), @@ -195,6 +196,7 @@ func (r *ResourceGroupResource) buildRequest(ctx context.Context, plan *Resource SuppressMemberAlerts: boolPtrOrNil(plan.SuppressMemberAlerts), ConfirmationDelaySeconds: int32PtrOrNil(plan.ConfirmationDelaySeconds), RecoveryCooldownMinutes: int32PtrOrNil(plan.RecoveryCooldownMinutes), + ManagedBy: &managedByTF, }, diags } @@ -219,6 +221,7 @@ func (r *ResourceGroupResource) buildUpdateRequest(ctx context.Context, plan *Re if diags.HasError() { return generated.UpdateResourceGroupRequest{}, diags } + managedByTF := generated.UpdateResourceGroupRequestManagedByTERRAFORM return generated.UpdateResourceGroupRequest{ Name: plan.Name.ValueString(), Description: stringPtrOrNil(plan.Description), @@ -236,6 +239,7 @@ func (r *ResourceGroupResource) buildUpdateRequest(ctx context.Context, plan *Re SuppressMemberAlerts: boolPtrOrNil(plan.SuppressMemberAlerts), ConfirmationDelaySeconds: int32PtrOrNil(plan.ConfirmationDelaySeconds), RecoveryCooldownMinutes: int32PtrOrNil(plan.RecoveryCooldownMinutes), + ManagedBy: &managedByTF, }, diags } diff --git a/internal/provider/resources/schema_dto_audit_test.go b/internal/provider/resources/schema_dto_audit_test.go index 06c0081..1a756ae 100644 --- a/internal/provider/resources/schema_dto_audit_test.go +++ b/internal/provider/resources/schema_dto_audit_test.go @@ -148,7 +148,8 @@ func TestSchemaVsDTO_Audit(t *testing.T) { "channel_type": "type", }, allowed: map[string]string{ - "config": "Discriminated union spread across per-channel-type schema blocks (slack, discord, email, …); the union is built by the provider's buildConfig().", + "config": "Discriminated union spread across per-channel-type schema blocks (slack, discord, email, …); the union is built by the provider's buildConfig().", + "managed_by": "Hardcoded to TERRAFORM by the provider; not a user-facing knob.", }, }, { @@ -156,7 +157,8 @@ func TestSchemaVsDTO_Audit(t *testing.T) { resource: &AlertChannelResource{}, dto: generated.UpdateAlertChannelRequest{}, allowed: map[string]string{ - "config": "See alert_channel_create note: discriminated union exploded into per-type blocks.", + "config": "See alert_channel_create note: discriminated union exploded into per-type blocks.", + "managed_by": "Hardcoded to TERRAFORM by the provider; not a user-facing knob.", }, }, { @@ -213,13 +215,17 @@ func TestSchemaVsDTO_Audit(t *testing.T) { name: "resource_group_create", resource: &ResourceGroupResource{}, dto: generated.CreateResourceGroupRequest{}, - allowed: map[string]string{}, + allowed: map[string]string{ + "managed_by": "Hardcoded to TERRAFORM by the provider; not a user-facing knob.", + }, }, { name: "resource_group_update", resource: &ResourceGroupResource{}, dto: generated.UpdateResourceGroupRequest{}, - allowed: map[string]string{}, + allowed: map[string]string{ + "managed_by": "Hardcoded to TERRAFORM by the provider; not a user-facing knob.", + }, }, { name: "resource_group_membership_create", @@ -257,13 +263,17 @@ func TestSchemaVsDTO_Audit(t *testing.T) { name: "status_page_create", resource: &StatusPageResource{}, dto: generated.CreateStatusPageRequest{}, - allowed: map[string]string{}, + allowed: map[string]string{ + "managed_by": "Hardcoded to TERRAFORM by the provider; not a user-facing knob.", + }, }, { name: "status_page_update", resource: &StatusPageResource{}, dto: generated.UpdateStatusPageRequest{}, - allowed: map[string]string{}, + allowed: map[string]string{ + "managed_by": "Hardcoded to TERRAFORM by the provider; not a user-facing knob.", + }, }, { name: "status_page_component_create", diff --git a/internal/provider/resources/status_page.go b/internal/provider/resources/status_page.go index 4039c73..bf8bc51 100644 --- a/internal/provider/resources/status_page.go +++ b/internal/provider/resources/status_page.go @@ -233,6 +233,7 @@ func (r *StatusPageResource) Create(ctx context.Context, req resource.CreateRequ return } + managedByTF := generated.CreateStatusPageRequestManagedByTERRAFORM body := generated.CreateStatusPageRequest{ Name: plan.Name.ValueString(), Slug: plan.Slug.ValueString(), @@ -241,6 +242,7 @@ func (r *StatusPageResource) Create(ctx context.Context, req resource.CreateRequ Enabled: boolPtrOrNil(plan.Enabled), IncidentMode: incidentModeCreatePtr(plan.IncidentMode), Branding: branding, + ManagedBy: &managedByTF, } page, err := api.Create[generated.StatusPageDto](ctx, r.client, api.PathStatusPages, body) @@ -300,6 +302,7 @@ func (r *StatusPageResource) Update(ctx context.Context, req resource.UpdateRequ } name := plan.Name.ValueString() + managedByTF := generated.UpdateStatusPageRequestManagedByTERRAFORM body := generated.UpdateStatusPageRequest{ Name: &name, // Description follows the API's "null preserves, empty string clears" @@ -310,6 +313,7 @@ func (r *StatusPageResource) Update(ctx context.Context, req resource.UpdateRequ Visibility: visibilityUpdatePtr(plan.Visibility), Enabled: boolPtrOrNil(plan.Enabled), IncidentMode: incidentModeUpdatePtr(plan.IncidentMode), + ManagedBy: &managedByTF, // Branding is non-pointer in the Update DTO so it must always be sent. // brandingForUpdate handles three cases: // - plan.Branding fully populated (UseStateForUnknown filled blanks