Go SDK
Pricing
Public price catalog for all billable resources
2 methods
GET
ListPrices()
List all prices
Parameters
servicestring
- Filter by service
resource_typestring
- Filter by resource type
active_onlyboolean
- Only return active prices
Example
package mainimport ("context""fmt""github.com/bycoded/bycloud-go")func main() {client := bycloud.New(bycloud.WithToken("YOUR_ACCESS_TOKEN"))ctx := context.Background()result, err := client.Pricing.ListPrices(ctx)if err != nil {panic(err)}fmt.Println(result)}
GET
GetPrice()
Get price by SKU
Parameters
skustring
required- SKU identifier
Example
package mainimport ("context""fmt""github.com/bycoded/bycloud-go")func main() {client := bycloud.New(bycloud.WithToken("YOUR_ACCESS_TOKEN"))ctx := context.Background()result, err := client.Pricing.GetPrice(ctx, &bycloud.GetPriceParams{Sku: "example",})if err != nil {panic(err)}fmt.Println(result)}