Authorizations
Query Parameters
Response
200 - application/vnd.api+json
Success
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Traffic.GetQuota(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.TrafficQuota != nil {
// handle response
}
}{
"data": {
"id": "traffic_quota",
"type": "traffic_quota",
"attributes": {
"quota_per_project": [
{
"project_id": "proj_e8pKq0aKDWAob",
"project_slug": "synergistic-linen-computer",
"billing_method": "Normal",
"quota_per_region": [
{
"region_id": "reg_9QDB5qag",
"price": 500,
"region_slug": "brazil",
"quota_in_tb": {
"granted": 20,
"additional": 0,
"total": 20
},
"quota_in_mbps": {
"granted": 0,
"additional": 0,
"total": 0
}
}
]
}
]
}
},
"meta": {}
}package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Traffic.GetQuota(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.TrafficQuota != nil {
// handle response
}
}{
"data": {
"id": "traffic_quota",
"type": "traffic_quota",
"attributes": {
"quota_per_project": [
{
"project_id": "proj_e8pKq0aKDWAob",
"project_slug": "synergistic-linen-computer",
"billing_method": "Normal",
"quota_per_region": [
{
"region_id": "reg_9QDB5qag",
"price": 500,
"region_slug": "brazil",
"quota_in_tb": {
"granted": 20,
"additional": 0,
"total": 20
},
"quota_in_mbps": {
"granted": 0,
"additional": 0,
"total": 0
}
}
]
}
]
}
},
"meta": {}
}Success
Show child attributes
Was this page helpful?