From 027b3d678176b615ff496faf95bf7bb4598002d9 Mon Sep 17 00:00:00 2001 From: jwierzbo Date: Wed, 24 Sep 2025 14:38:21 +0200 Subject: [PATCH 1/2] OAS-11429 Billing 2.0 usage items type --- usage/v1/kinds.go | 53 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/usage/v1/kinds.go b/usage/v1/kinds.go index f00228df..5e92c597 100644 --- a/usage/v1/kinds.go +++ b/usage/v1/kinds.go @@ -23,27 +23,61 @@ package v1 const ( // UsageItems kind - // UsageItemKindDeploymentSize indicates a UsageItem that contains cloud - // resources for Deployment. - // UsageItems from this kind will not be closed automatically, so open items can exists. - UsageItemKindDeploymentSize = "DeploymentSize" + // UsageItemKindCPUSize indicates a UsageItem that contains + // the amount of CPU resources used by a deployment (or member of a deployment). + // UsageItems of this kind will not be closed automatically, so open items can exist. + UsageItemKindCPUSize = "CPUSize" + + // UsageItemKindMemorySize indicates a UsageItem that contains + // the amount of memory resources used by a deployment (or member of a deployment). + // UsageItems of this kind will not be closed automatically, so open items can exist. + UsageItemKindMemorySize = "MemorySize" + + // UsageItemKindStorageSize indicates a UsageItem that contains + // the amount of storage resources used by a deployment (or member of a deployment). + // UsageItems of this kind will not be closed automatically, so open items can exist. + UsageItemKindStorageSize = "StorageSize" + // UsageItemKindNetworkTransferSize indicates a UsageItem that contains // the amount of network traffic caused by a deployment (or member of a deployment). - // UsageItems from this kind will be closed automatically, so no open items can exists. + // UsageItems of this kind will be closed automatically, so no open items can exist. // The timespan of this UsageItem is normally 24h (unless the deployment is deleted) UsageItemKindNetworkTransferSize = "NetworkTransferSize" - // UsageItemKindBackupStorageSize indicates a UsageItem that contains + + // UsageItemKindCloudStorageSize indicates a UsageItem that contains the amount of Cloud Storage data, + // e.g. for backup, audit, platform, etc. + // UsageItems of this kind will not be closed automatically, so open items can exist. + UsageItemKindCloudStorageSize = "CloudStorageSize" + + /* + ### + Deprecated section - to be removed in future releases: + ### + */ + + // Deprecated: UsageItemKindDeploymentSize indicates a UsageItem that contains cloud + // resources for Deployment. + // UsageItems of this kind will not be closed automatically, so open items can exist. + // This is replaced by CPUSize + MemorySize + StorageSize usage kinds + UsageItemKindDeploymentSize = "DeploymentSize" + + // Deprecated: UsageItemKindBackupStorageSize indicates a UsageItem that contains // the amount of cloud storage used by backups of a deployment. // UsageItems from this kind will not be closed automatically, so open items can exists. + // This is replaced by CloudStorageSize usage kind UsageItemKindBackupStorageSize = "BackupStorageSize" - // UsageItemKindAuditLogSize indicates a UsageItem that contains + + // Deprecated: UsageItemKindAuditLogSize indicates a UsageItem that contains // the amount of resources used by audit log (of a deployment). // UsageItems from this kind will be closed automatically, so no open items can exists. // The timespan of this UsageItem is normally 24h (unless the auditlog or deployment is deleted) + // This is replaced by StorageSize usage kind UsageItemKindAuditLogSize = "AuditLogSize" - // UsageItemKindAuditLogStorageSize indicates a UsageItem that contains + + // Deprecated: UsageItemKindAuditLogStorageSize indicates a UsageItem that contains // the amount of cloud storage used by audit log (of a deployment). // UsageItems from this kind will not be closed automatically, so open items can exists. + // This is replaced by CloudStorageSize usage kind UsageItemKindAuditLogStorageSize = "AuditLogStorageSize" // Deprecated: UsageItemKindNotebookSize indicates a UsageItem that contains @@ -58,8 +92,7 @@ const ( // the amount of resources used by a ML job (of a MLServices). // UsageItems of this kind are closed on creation itself, so open items cannot exist. UsageItemKindMLJobSize = "MLJobSize" - - // UsageItemKindGraphAnalyticsJobSize indicates a UsageItem that contains + // Deprecated: UsageItemKindGraphAnalyticsJobSize indicates a UsageItem that contains // the amount of resources used by a GraphAnalytics job. // UsageItems of this kind are closed on creation, so open items cannot exist. UsageItemKindGraphAnalyticsJobSize = "GraphAnalyticsJobSize" From 2af0c1c15af86759c87e7e2e07a825e23abe9809 Mon Sep 17 00:00:00 2001 From: jwierzbo Date: Wed, 8 Oct 2025 14:58:33 +0200 Subject: [PATCH 2/2] update --- usage/v1/kinds.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usage/v1/kinds.go b/usage/v1/kinds.go index 5e92c597..3cce603f 100644 --- a/usage/v1/kinds.go +++ b/usage/v1/kinds.go @@ -23,28 +23,28 @@ package v1 const ( // UsageItems kind - // UsageItemKindCPUSize indicates a UsageItem that contains + // UsageItemKindCPUSize (Billing 2.0) indicates a UsageItem that contains // the amount of CPU resources used by a deployment (or member of a deployment). // UsageItems of this kind will not be closed automatically, so open items can exist. UsageItemKindCPUSize = "CPUSize" - // UsageItemKindMemorySize indicates a UsageItem that contains + // UsageItemKindMemorySize (Billing 2.0) indicates a UsageItem that contains // the amount of memory resources used by a deployment (or member of a deployment). // UsageItems of this kind will not be closed automatically, so open items can exist. UsageItemKindMemorySize = "MemorySize" - // UsageItemKindStorageSize indicates a UsageItem that contains + // UsageItemKindStorageSize (Billing 2.0) indicates a UsageItem that contains // the amount of storage resources used by a deployment (or member of a deployment). // UsageItems of this kind will not be closed automatically, so open items can exist. UsageItemKindStorageSize = "StorageSize" - // UsageItemKindNetworkTransferSize indicates a UsageItem that contains + // UsageItemKindNetworkTransferSize (Billing 1.0 & 2.0) indicates a UsageItem that contains // the amount of network traffic caused by a deployment (or member of a deployment). // UsageItems of this kind will be closed automatically, so no open items can exist. // The timespan of this UsageItem is normally 24h (unless the deployment is deleted) UsageItemKindNetworkTransferSize = "NetworkTransferSize" - // UsageItemKindCloudStorageSize indicates a UsageItem that contains the amount of Cloud Storage data, + // UsageItemKindCloudStorageSize (Billing 2.0) indicates a UsageItem that contains the amount of Cloud Storage data, // e.g. for backup, audit, platform, etc. // UsageItems of this kind will not be closed automatically, so open items can exist. UsageItemKindCloudStorageSize = "CloudStorageSize"