pydo.apps.get_instance_size()

Description

Retrieve information about a specific instance size for service, worker, and job components.

Parameters

Name Type Required Description Default Value
slug string True The slug of the instance size

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

get_resp = client.apps.get_instance_size(slug="apps-s-1vcpu-0.5gb")

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

A JSON with key instance_size

Click to expand an example response for instance_size.
{
  "value": {
    "instance_size": {
      "name": "Shared 1VCPU 0.5GB",
      "slug": "apps-s-1vcpu-0.5gb",
      "cpu_type": "SHARED",
      "cpus": "1",
      "memory_bytes": "536870912",
      "usd_per_month": "5.00",
      "usd_per_second": "0.000002066799",
      "tier_slug": "basic",
      "single_instance_only": true,
      "bandwidth_allowance_gib": "50"
    }
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

The resource was not found.

Click to expand an example response.
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}