Skip to content

Commit b7cd64f

Browse files
feat(edge_services): add WAF billing (scaleway#2418)
Co-authored-by: Laure-di <[email protected]>
1 parent 8ae0044 commit b7cd64f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

api/edge_services/v1alpha1/edge_services_sdk.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,15 @@ type PlanDetails struct {
977977

978978
// PipelineLimit: number of pipelines included in subscription plan.
979979
PipelineLimit uint32 `json:"pipeline_limit"`
980+
981+
// WafRequests: number of WAF requests included in subscription plan.
982+
WafRequests uint64 `json:"waf_requests"`
983+
}
984+
985+
// PlanUsageDetails: plan usage details.
986+
type PlanUsageDetails struct {
987+
// PlanCost: cost to date (this month) for the corresponding Edge Services subscription plan.
988+
PlanCost *scw.Money `json:"plan_cost"`
980989
}
981990

982991
// PipelineStages: pipeline stages.
@@ -1237,6 +1246,21 @@ type GetBillingResponse struct {
12371246
// ExtraCacheCost: cost to date (this month) of the data egressed from the cache that is not included in the subscription plans.
12381247
ExtraCacheCost *scw.Money `json:"extra_cache_cost"`
12391248

1249+
// CurrentPlanWafUsage: total number of requests processed by the WAF since the beginning of the current month, for the active subscription plan.
1250+
CurrentPlanWafUsage uint64 `json:"current_plan_waf_usage"`
1251+
1252+
// ExtraWafUsage: total number of extra requests processed by the WAF from the beginning of the month, not included in the subscription plans.
1253+
ExtraWafUsage uint64 `json:"extra_waf_usage"`
1254+
1255+
// ExtraWafCost: cost to date (this month) of the extra requests processed by the WAF that were not included in the subscription plans.
1256+
ExtraWafCost *scw.Money `json:"extra_waf_cost"`
1257+
1258+
// WafAddOn: cost of activating WAF add-on (where subscription plan does not include WAF).
1259+
WafAddOn *scw.Money `json:"waf_add_on"`
1260+
1261+
// PlansUsageDetails: detailed costs and usage for all Edge Services subscription plans that were activated during the month.
1262+
PlansUsageDetails map[string]*PlanUsageDetails `json:"plans_usage_details"`
1263+
12401264
// TotalCost: total cost to date (this month) of all Edge Services resources including active subscription plan, previously active plans, extra pipelines and extra egress cache data.
12411265
TotalCost *scw.Money `json:"total_cost"`
12421266
}

0 commit comments

Comments
 (0)