Skip to main content
POST
/
plans
/
bandwidth
Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os


with Latitudesh(
    bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:

    res = latitudesh.plans.update_bandwidth(data={
        "type": latitudesh_python_sdk.UpdatePlansBandwidthPlansType.BANDWIDTH_PACKAGES,
        "attributes": {
            "project": "proj_VE1Wd3EKDXnZJ",
            "quantity": 5,
            "region_slug": "brazil",
        },
    })

    # Handle response
    print(res)
{
  "data": {
    "type": "bandwidth_packages",
    "attributes": {
      "project": {
        "id": "proj_z2A3DVZ3DnawP",
        "name": "Renner-Rodriguez",
        "slug": "renner-rodriguez"
      },
      "packages": [
        {
          "region_slug": "united-states",
          "unit_price": 0.5,
          "currency": "USD",
          "contracted": 10,
          "total_price": 5
        },
        {
          "region_slug": "brazil",
          "unit_price": 4.6,
          "currency": "USD",
          "contracted": 0,
          "total_price": 0
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Body

data
object

Response

200 - application/vnd.api+json

Success

type
enum<string>
Available options:
bandwidth_packages
attributes
object
I