Get Pricing Metric
client.PricingMetrics.Get(ctx, pricingMetricID) (*PricingMetricResource, error)
/pricing-metrics/{pricing_metric_id}
Get Pricing Metric
Parameters
pricingMetricID string
Returns
Get Pricing Metric
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/-go"
"github.com/stainless-sdks/-go/option"
)
func main() {
client := lark.NewClient(
option.WithAPIKey("My API Key"),
)
pricingMetricResource, err := client.PricingMetrics.Get(context.TODO(), "pricing_metric_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", pricingMetricResource.ID)
}
{
"id": "pmtr_GlX5Tcm2HOn00CoRTFxw2Amw",
"aggregation": {
"aggregation_type": "sum",
"value_field": "compute_hours"
},
"event_name": "job_completed",
"name": "Compute Hours",
"unit": "hours",
"dimensions": [
"string"
]
}Returns Examples
{
"id": "pmtr_GlX5Tcm2HOn00CoRTFxw2Amw",
"aggregation": {
"aggregation_type": "sum",
"value_field": "compute_hours"
},
"event_name": "job_completed",
"name": "Compute Hours",
"unit": "hours",
"dimensions": [
"string"
]
}