{"id":26474006,"url":"https://github.com/digitalocean/droplet_kit","last_synced_at":"2025-05-14T20:09:45.091Z","repository":{"id":19527315,"uuid":"22774726","full_name":"digitalocean/droplet_kit","owner":"digitalocean","description":"DropletKit is the official DigitalOcean API client for Ruby.","archived":false,"fork":false,"pushed_at":"2025-02-26T14:47:50.000Z","size":754,"stargazers_count":515,"open_issues_count":20,"forks_count":154,"subscribers_count":151,"default_branch":"main","last_synced_at":"2025-04-10T01:06:11.364Z","etag":null,"topics":["api","cloud","digitalocean","hacktoberfest","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"debasishg/erlang-string-lambda","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitalocean.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-08T23:50:19.000Z","updated_at":"2025-04-07T12:24:53.000Z","dependencies_parsed_at":"2024-01-25T22:44:34.602Z","dependency_job_id":"870162b0-6dcf-4279-9dfa-96e56b3d02b1","html_url":"https://github.com/digitalocean/droplet_kit","commit_stats":{"total_commits":368,"total_committers":77,"mean_commits":4.779220779220779,"dds":0.7961956521739131,"last_synced_commit":"06b3d05531eda34e32e8161e667a1e376b95af4c"},"previous_names":[],"tags_count":62,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdroplet_kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdroplet_kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdroplet_kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fdroplet_kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalocean","download_url":"https://codeload.github.com/digitalocean/droplet_kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254219374,"owners_count":22034397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cloud","digitalocean","hacktoberfest","ruby"],"created_at":"2025-03-19T22:39:46.129Z","updated_at":"2025-05-14T20:09:45.067Z","avatar_url":"https://github.com/digitalocean.png","language":"Ruby","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# DropletKit\n[![Build Status](https://github.com/digitalocean/droplet_kit/workflows/CI/badge.svg?branch=main)](https://github.com/digitalocean/droplet_kit/actions)\n[![Gem Version](https://badge.fury.io/rb/droplet_kit.svg)](https://badge.fury.io/rb/droplet_kit)\n\nDropletKit is the official [DigitalOcean V2 API](https://developers.digitalocean.com/v2/) client. It supports everything the API can do with a simple interface written in Ruby.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'droplet_kit'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install droplet_kit\n\n## Usage\n\nYou'll need to generate an access token in DigitalOcean's control panel at https://cloud.digitalocean.com/settings/applications\n\nUsing your access token, retrieve a client instance.\n\n```ruby\nrequire 'droplet_kit'\nclient = DropletKit::Client.new(access_token: 'YOUR_TOKEN')\n```\n\n### Timeout\n\nYou may also set timeout and time to first byte options on the client.\n\n```ruby\nrequire 'droplet_kit'\nclient = DropletKit::Client.new(\n  access_token: 'YOUR_TOKEN',\n  open_timeout: 60, # time to first byte in seconds\n  timeout:      120, # response timeout in seconds\n)\n```\n\n### Custom User-Agent\n\nIf you would like to include a custom User-Agent header beyond what DropletKit\nuses, you can pass one in at the client initialization like so:\n\n```ruby\nrequire 'droplet_kit'\nclient = DropletKit::Client.new(access_token: 'YOUR_TOKEN', user_agent: 'custom')\n```\n\n### Automatically Retry Rate Limited Requests\n\nBy default, DropletKit will handle requests that are rate limited by the DigitalOcean API's [burst limit](https://docs.digitalocean.com/reference/api/api-reference/#section/Introduction/Rate-Limit). When the burst rate limit is reached, DropletKit will wait according to the value of the API response's `Retry-After` header. Typically the wait time is less than one minute. When the hourly rate limit is hit, an error is raised.\n\nBy default, DropletKit will retry a rate limited request three times before returning an error. If you would like to disable the retry behavior altogether, and instead raise an error when any rate limit is reached, you can set the `retry_max` config value to zero.\n\nDropletKit will also wait zero seconds until retrying a request after the `Retry-After` time has elapsed by default. To change this, set the `retry_wait_min` to a different value.\n\n```ruby\nrequire 'droplet_kit'\nclient = DropletKit::Client.new(access_token: 'YOUR_TOKEN', retry_max: 3, retry_wait_min: 1)\n```\n\n## Design\n\nDropletKit follows a strict design of resources as methods on your client. For examples, for droplets, you will call your client like this:\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'YOUR_TOKEN')\nclient.droplets #=\u003e DropletsResource\n```\n\nDropletKit will return Plain Old Ruby objects(tm) that contain the information provided by the API. For actions that return multiple objects, the request won't be executed until the result is accessed. For example:\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'YOUR_TOKEN')\n\n# Returns an instance of a Paginated Resource.\nclient.droplets.all\n# =\u003e #\u003cDropletKit::PaginatedResource:0x000000010d556c3a\u003e\n\n# Returns the first Droplet.\nclient.droplets.all.first\n# =\u003e \u003cDropletKit::Droplet {:@id=\u003e1, :@name=\u003e\"mydroplet\", ...}\u003e\n\n# Returns an array of Droplet IDs.\nclient.droplets.all.map(\u0026:id)\n# =\u003e [1]\n```\n\nWhen you'd like to save objects, it's your responsibility to instantiate the objects and persist them using the resource objects. Let's use creating a Droplet as an example:\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'YOUR_TOKEN')\ndroplet = DropletKit::Droplet.new(name: 'mysite.com', region: 'nyc2', image: 'ubuntu-14-04-x64', size: 's-1vcpu-1gb')\ncreated = client.droplets.create(droplet)\n# =\u003e DropletKit::Droplet(id: 1231, name: 'something.com', ...)\n```\n\nTo retrieve objects, you can perform this type of action on the resource (if the API supports it):\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'YOUR_TOKEN')\ndroplet = client.droplets.find(id: 123)\n# =\u003e DropletKit::Droplet(id: 1231, name: 'something.com', ...)\n```\n\n# All Resources and actions.\n\n## CDN resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.cdns #=\u003e DropletKit::CertificateResource\ncdn = DropletKit::CDN.new(\n  origin: 'myspace.nyc3.digitaloceanspaces.com',\n  ttl: 1800,\n  custom_domain: 'www.myacme.xyz',\n  certificate_id: 'a6689b98-2bb9-40be-8638-fb8426aabd26'\n)\n```\n\nActions supported:\n\n* `client.cdns.find(id: 'id')`\n* `client.cdns.all()`\n* `client.cdns.create(cdn)`\n* `client.cdns.update_ttl(id: 'id', ttl: 3600)`\n* `client.cdns.update_custom_domain(id: 'id', custom_domain: 'www.myacme.xyz', certificate_id: 'a6689b98-2bb9-40be-8638-fb8426aabd26')`\n* `client.cdns.flush_cache(id: 'id', files: ['*', 'path/to/css/*'])`\n* `client.cdns.delete(id: 'id')`\n\n## Certificate resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.certificates #=\u003e DropletKit::CertificateResource\n```\n\nActions supported:\n\n* `client.certificates.find(id: 'id')`\n* `client.certificates.all()`\n* `client.certificates.create(certificate)`\n* `client.certificates.delete(id: 'id')`\n\n## Database resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.databases #=\u003e DropletKit::DatabaseResource\ndatabase_cluster = DropletKit::DatabaseCluster.new(\n  name: 'backend',\n  engine: 'pg',\n  version: '10',\n  region: 'nyc3',\n  size: 'db-s-2vcpu-4gb',\n  num_nodes: 2,\n  tags: ['production']\n)\n```\n\nActions supported:\n\n* `client.databases.find_cluster(id: 'id')`\n* `client.databases.all_clusters()`\n* `client.databases.create_cluster(database_cluster)`\n* `client.databases.resize_cluster(database_cluster, id: 'id')`\n* `client.databases.migrate_cluster(database_cluster, id: 'id')`\n* `client.databases.set_maintenance_window(database_maintenance_window, id: 'id')`\n* `client.databases.update_maintenance_window(database_maintenance_window, id: 'id')`\n* `client.databases.list_backups(id: 'id')`\n* `client.databases.restore_from_backup(database_backup)`\n* `client.databases.delete_cluster(id: 'id')`\n* `client.databases.create_db(database, id: 'id')`\n* `client.databases.find_db(id: 'id', name: 'name')`\n* `client.databases.all_dbs(id: 'id')`\n* `client.databases.delete_db(id: 'id', name: 'name')`\n* `client.databases.list_firewall_rules(id: 'id')`\n* `client.databases.set_firewall_rules(database_firewall_rules, id: 'id')`\n* `client.databases.create_read_only_replica(database_read_only_replica, id: 'id')`\n* `client.databases.find_read_only_replica(id: 'id', name: 'name')`\n* `client.databases.list_read_only_replicas(id: 'id')`\n* `client.databases.delete_read_only_replica(id: 'id', name: 'name')`\n* `client.databases.create_database_user(database_user, id: 'id')`\n* `client.databases.find_database_user(id: 'id', name: 'name')`\n* `client.databases.list_database_users(id: 'id')`\n* `client.databases.reset_database_user_auth(reset_auth, id: 'id', name: 'name')`\n* `client.databases.delete_database_user(id: 'id', name: 'name')`\n* `client.databases.create_connection_pool(database_connection_pool, id: 'id')`\n* `client.databases.find_connection_pool(id: 'id', name: 'name')`\n* `client.databases.list_connection_pools(id: 'id')`\n* `client.databases.update_connection_pool(database_connection_pool, id: 'id', name: 'name')`\n* `client.databases.delete_connection_pool(id: 'id', name: 'name')`\n* `client.databases.set_eviction_policy(database_eviction_policy, id: 'id')`\n* `client.databases.get_eviction_policy(id: 'id')`\n* `client.databases.set_sql_mode(database_sql_mode, id: 'id')`\n* `client.databases.get_sql_mode(id: 'id')`\n* `client.databases.get_metrics_credentials`\n* `client.databases.update_metrics_credentials(database_metrics_credentials)`\n* `client.databases.get_mongo_config(id: 'id')`\n* `client.databases.get_postgres_config(id: 'id')`\n* `client.databases.get_mysql_config(id: 'id')`\n* `client.databases.get_redis_config(id: 'id')`\n* `client.databases.get_kafka_config(id: 'id')`\n* `client.databases.get_opensearch_config(id: 'id')`\n* `client.databases.update_mongo_config(mongo_config, id: 'id')`\n* `client.databases.update_postgres_config(postgres_config, id: 'id')`\n* `client.databases.update_mysql_config(mysql_config, id: 'id')`\n* `client.databases.update_redis_config(redis_config, id: 'id')`\n* `client.databases.update_kafka_config(kafka_config, id: 'id')`\n* `client.databases.update_opensearch_config(opensearch_config, id: 'id')`\n\n## Droplet resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.droplets #=\u003e DropletKit::DropletResource\n```\n\nActions supported:\n\n* `client.droplets.all()`\n* `client.droplets.all(tag_name: 'tag_name')`\n* `client.droplets.find(id: 'id')`\n* `client.droplets.create(droplet)`\n* `client.droplets.create_multiple(droplet)`\n* `client.droplets.delete(id: 'id')`\n* `client.droplets.delete_for_tag(tag_name: 'tag_name')`\n* `client.droplets.kernels(id: 'id')`\n* `client.droplets.snapshots(id: 'id')`\n* `client.droplets.backups(id: 'id')`\n* `client.droplets.actions(id: 'id')`\n\n## Droplet Action resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.droplet_actions #=\u003e DropletKit::DropletAction\n```\n\nActions supported:\n\n* `client.droplet_actions.reboot(droplet_id: droplet.id)`\n* `client.droplet_actions.power_cycle(droplet_id: droplet.id)`\n* `client.droplet_actions.power_cycle_for_tag(tag_name: 'tag_name')`\n* `client.droplet_actions.shutdown(droplet_id: droplet.id)`\n* `client.droplet_actions.shutdown_for_tag(tag_name: 'tag_name')`\n* `client.droplet_actions.power_off(droplet_id: droplet.id)`\n* `client.droplet_actions.power_off_for_tag(tag_name: 'tag_name')`\n* `client.droplet_actions.power_on(droplet_id: droplet.id)`\n* `client.droplet_actions.power_on_for_tag(tag_name: 'tag_name')`\n* `client.droplet_actions.password_reset(droplet_id: droplet.id)`\n* `client.droplet_actions.enable_ipv6(droplet_id: droplet.id)`\n* `client.droplet_actions.enable_ipv6_for_tag(tag_name: 'tag_name')`\n* `client.droplet_actions.enable_backups(droplet_id: droplet.id)`\n* `client.droplet_actions.enable_backups_for_tag(tag_name: 'tag_name')`\n* `client.droplet_actions.disable_backups(droplet_id: droplet.id)`\n* `client.droplet_actions.disable_backups_for_tag(tag_name: 'tag_name')`\n* `client.droplet_actions.upgrade(droplet_id: droplet.id)`\n* `client.droplet_actions.enable_private_networking(droplet_id: droplet.id)`\n* `client.droplet_actions.enable_private_networking_for_tag(tag_name: 'tag_name')`\n* `client.droplet_actions.snapshot(droplet_id: droplet.id, name: 'Snapshot Name')`\n* `client.droplet_actions.snapshot_for_tag(tag_name: 'tag_name', name: 'Snapshot Name')`\n* `client.droplet_actions.change_kernel(droplet_id: droplet.id, kernel: 'kernel_id')`\n* `client.droplet_actions.rename(droplet_id: droplet.id, name: 'New-Droplet-Name')`\n* `client.droplet_actions.rebuild(droplet_id: droplet.id, image: 'image_id')`\n* `client.droplet_actions.restore(droplet_id: droplet.id, image: 'image_id')`\n* `client.droplet_actions.resize(droplet_id: droplet.id, size: 's-1vcpu-1gb')`\n* `client.droplet_actions.find(droplet_id: droplet.id, id: action.id)`\n* `client.droplet_actions.action_for_id(droplet_id: droplet.id, type: 'event_name', param: 'value')`\n* `client.droplet_actions.action_for_tag(tag_name: 'tag_name', type: 'event_name', param: 'value')`\n\n## Domain resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.domains #=\u003e DropletKit::DomainResource\n```\n\nActions supported:\n\n* `client.domains.all()`\n* `client.domains.create(domain)`\n* `client.domains.find(name: 'name')`\n* `client.domains.delete(name: 'name')`\n\n\n## Domain record resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.domain_records #=\u003e DropletKit::DomainRecordResource\ndomain_record = DropletKit::DomainRecord.new(\n  type: 'CNAME',\n  name: 'www',\n  data: '@',\n  ttl: 1800\n)\n```\n\nActions supported:\n\n* `client.domain_records.all(for_domain: 'for_domain')`\n* `client.domain_records.create(domain_record, for_domain: 'for_domain')`\n* `client.domain_records.find(for_domain: 'for_domain', id: 'id')`\n* `client.domain_records.delete(for_domain: 'for_domain', id: 'id')`\n* `client.domain_records.update(domain_record, for_domain: 'for_domain', id: 'id')`\n\n## Firewall resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.firewalls #=\u003e DropletKit::FirewallResource\n\ninbound_rule = DropletKit::FirewallInboundRule.new(\n  protocol: 'icmp',\n  ports: '0',\n  sources: {\n    tags: ['frontend', 'backend'],\n    load_balancer_uids: ['d2d3920a-9d45-41b0-b018-d15e18ec60a4'],\n    kubernetes_ids: ['a47b6fb1-4791-4b29-aae1-2b1b9f68a2da']\n  }\n)\n\noutbound_rule = DropletKit::FirewallOutboundRule.new(\n  protocol: 'icmp',\n  ports: '0',\n  destinations: {\n    addresses: [\"127.0.0.0\"],\n    droplet_ids: [456, 789]\n  }\n)\n\nfirewall = DropletKit::Firewall.new(\n  name: 'firewall',\n  inbound_rules: [\n    inbound_rule\n  ],\n  outbound_rules: [\n    outbound_rule\n  ],\n  droplet_ids: [123],\n  tags: ['backend']\n)\n```\n\nActions supported:\n\n* `client.firewalls.find(id: 'id')`\n* `client.firewalls.create(firewall)`\n* `client.firewalls.update(firewall, id: 'id')`\n* `client.firewalls.all()`\n* `client.firewalls.all_by_droplet(droplet_id: 'id')`\n* `client.firewalls.delete(id: 'id')`\n* `client.firewalls.add_droplets([droplet.id], id: 'id')`\n* `client.firewalls.remove_droplets([droplet.id], id: 'id')`\n* `client.firewalls.add_tags([tag.name], id: 'id')`\n* `client.firewalls.remove_tags([tag.name], id: 'id')`\n* `client.firewalls.add_rules(inbound_rules: [inbound_rule], outbound_rules: [outbound_rule], id: 'id')`\n* `client.firewalls.remove_rules(inbound_rules: [inbound_rule], outbound_rules: [outbound_rule], id: 'id')`\n\n\n## Image resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.images #=\u003e DropletKit::ImageResource\n```\n\nActions supported:\n\n* `client.images.all()`\n* `client.images.find(id: 'id')`\n* `client.images.delete(id: 'id')`\n* `client.images.update(image, id: 'id')`\n\n\n## Image Action Resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.image_actions #=\u003e DropletKit::ImageActionResource\n```\n\nImage Actions Supported:\n\n* `client.image_actions.all(image_id: 123)`\n* `client.image_actions.find(image_id: 123, id: 123455)`\n* `client.image_actions.transfer(image_id: 123, region: 'nyc3')`\n\n## Invoice resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.invoices #=\u003e DropletKit::InvoiceResource\n```\n\nActions supported:\n\n* `client.invoices.list()`\n* `client.invoices.find(id:123)`\n\n## Kubernetes Resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.kubernetes_clusters #=\u003e DropletKit::KubernetesClusterResource\n```\n\nActions supported\n\nWhen the arguments below refer to cluster, they refer to:\n```\ncluster = DropletKit::KubernetesCluster.new(name: \"foo\", region: \"nyc1\", ...) # cluster attributes\n```\n\nWhen the arguments below refer to node_pool, they refer to:\n```\nnode_pool = DropletKit::KubernetesNodePool.new(name: 'frontend', size: 's-1vcpu-1gb', count: 3, ...) # Node Pool attributes\n```\n\n* `client.kubernetes_clusters.all()`\n* `client.kubernetes_clusters.find(id: 'cluster_id')`\n* `client.kubernetes_clusters.create(cluster)`\n* `client.kubernetes_clusters.kubeconfig(id: 'cluster_id')`\n* `client.kubernetes_clusters.update(cluster, id: 'cluster_id')`\n* `client.kubernetes_clusters.delete(id: 'cluster_id')`\n* `client.kubernetes_clusters.node_pools(id: 'cluster_id')`\n* `client.kubernetes_clusters.find_node_pool(id: 'cluster_id', pool_id: 'node_pool_id')`\n* `client.kubernetes_clusters.create_node_pool(node_pool, id: 'cluster_id')`\n* `client.kubernetes_clusters.update_node_pool(node_pool, id: 'cluster_id', pool_id: 'node_pool_id')`\n* `client.kubernetes_clusters.delete_node_pool(id: 'cluster_id', pool_id: 'node_pool_id')`\n* `client.kubernetes_clusters.recycle_node_pool([node_id, node_id, ...], id: 'cluster_id', pool_id: 'node_pool_id')`\n* `client.kubernetes_options.all()`\n\n\n## Load balancer resource\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.load_balancers #=\u003e DropletKit::LoadBalancerResource\n```\n\nActions supported:\n\n* `client.load_balancers.find(id: 'id')`\n* `client.load_balancers.all()`\n* `client.load_balancers.create(load_balancer)`\n* `client.load_balancers.update(load_balancer, id: 'id')`\n* `client.load_balancers.delete(id: 'id')`\n* `client.load_balancers.add_droplets([droplet.id], id: 'id')`\n* `client.load_balancers.remove_droplets([droplet.id], id: 'id')`\n* `client.load_balancers.add_forwarding_rules([forwarding_rule], id: 'id')`\n* `client.load_balancers.remove_forwarding_rules([forwarding_rule], id: 'id')`\n\n\n## Region resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.regions #=\u003e DropletKit::RegionResource\n```\n\nActions supported:\n\n* `client.regions.all()`\n\n\n## Size resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.sizes #=\u003e DropletKit::SizeResource\n```\n\nActions supported:\n\n* `client.sizes.all()`\n\n\n## SSH key resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.ssh_keys #=\u003e DropletKit::SSHKeyResource\n```\n\nWhen you want to create a droplet using your stored SSH key.\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'YOUR_TOKEN')\nmy_ssh_keys = client.ssh_keys.all.collect {|key| key.fingerprint}\ndroplet = DropletKit::Droplet.new(name: 'mysite.com', region: 'nyc2', image: 'ubuntu-14-04-x64', size: 's-1vcpu-1gb', ssh_keys: my_ssh_keys)\ncreated = client.droplets.create(droplet)\n# =\u003e DropletKit::Droplet(id: 1231, name: 'something.com', ...)\n```\n\nActions supported:\n\n* `client.ssh_keys.all()`\n* `client.ssh_keys.create(ssh_key)`\n* `client.ssh_keys.find(id: 'id')`\n* `client.ssh_keys.delete(id: 'id')`\n* `client.ssh_keys.update(ssh_key, id: 'id')`\n\n## Project resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.projects #=\u003e DropletKit::ProjectResource\n```\n\nActions supported:\n\n* `client.projects.all()`\n* `client.projects.find(id: 'id')`\n* `client.projects.find_default` is equivalent to `client.projects.find(id: DropletKit::Project::DEFAULT)`\n* `client.projects.create(DropletKit::Project.new(name: 'name', purpose: 'Service or API'))`\n* `client.projects.update(project, id: 'id')`\n* `client.projects.delete(id: 'id')`\n* `client.projects.list_resources(id: 'id')`\n* `client.projects.assign_resources([DropletKit::Droplet.new(id: 123), \"do:space:myspace.com\"], id: 'id')`\n\n## Tag resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.tags #=\u003e DropletKit::TagResource\n```\n\nActions supported:\n\n* `client.tags.all()`\n* `client.tags.find(name: 'name')`\n* `client.tags.create(DropletKit::Tag.new(name: 'name'))`\n* `client.tags.delete(name: 'name')`\n* `client.tags.tag_resources(name: 'name', resources: [{ resource_id =\u003e 'droplet_id', resource_type: 'droplet' },{ resource_id =\u003e 'image_id', resource_type: 'image' }])`\n* `client.tags.untag_resources(name 'name', resources: [{ resource_id =\u003e 'droplet_id', resource_type: 'droplet' },{ resource_id =\u003e 'image_id', resource_type: 'image' }])`\n\n## Account resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.account #=\u003e DropletKit::AccountResource\n```\n\nActions supported:\n\n* `client.account.info()`\n\n## Balance resource\n\n```ruby\nclient = DropletKit::Client.new(access_token: 'TOKEN')\nclient.balance #=\u003e DropletKit::BalanceResource\n```\n\nActions supported:\n\n* `client.balance.info()`\n\n## Reserved IP resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.reserved_ips #=\u003e DropletKit::ReservedIpResource\n\nActions supported:\n\n* `client.reserved_ips.all()`\n* `client.reserved_ips.find(ip: 'ip address')`\n* `client.reserved_ips.create(reserved_ip)`\n* `client.reserved_ips.delete(ip: 'ip address')`\n\n## Reserved IP Action resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.reserved_ip_actions #=\u003e DropletKit::ReservedIpActionResource\n\nActions supported:\n\n* `client.reserved_ip_actions.assign(ip: reserved_ip.ip, droplet_id: droplet.id)`\n* `client.reserved_ip_actions.unassign(ip: reserved_ip.ip)`\n\n## Reserved IPv6 resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.reserved_ipv6s #=\u003e DropletKit::ReservedIpv6Resource\n    reserved_ipv6 = DropletKit::ReservedIpv6.new(\n      region_slug: 'nyc1'\n    )\n\nActions supported:\n\n* `client.reserved_ipv6s.all()`\n* `client.reserved_ipv6s.find(ip: 'ip address')`\n* `client.reserved_ipv6s.create(reserved_ipv6)`\n* `client.reserved_ipv6s.delete(ip: 'ip address')`\n\n## Reserved IPv6 Action resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.reserved_ipv6_actions #=\u003e DropletKit::ReservedIpv6ActionResource\n\nActions supported:\n\n* `client.reserved_ipv6_actions.assign(ip: reserved_ipv6.ip, droplet_id: droplet.id)`\n* `client.reserved_ipv6_actions.unassign(ip: reserved_ipv6.ip)`\n\n## Volume resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.volumes #=\u003e DropletKit::VolumeResource\n\nActions supported:\n\n* `client.volumes.all()`\n* `client.volumes.find(id: 'id')`\n* `client.volumes.create(volume)`\n* `client.volumes.snapshots(id: 'id')`\n* `client.volumes.create_snapshot(id: 'id', name: 'snapshot-name')`\n* `client.volumes.delete(id: 'id')`\n\n\n## Volume Action resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.volume_actions #=\u003e DropletKit::VolumeActionResource\n\nActions supported:\n\n* `client.volume_actions.attach(volume_id: volume.id, droplet_id: droplet.id, region: droplet.region.slug)`\n* `client.volume_actions.detach(volume_id: volume.id, droplet_id: droplet.id, region: droplet.region.slug)`\n* `client.volume_actions.resize(volume_id: volume.id, size_gigabytes: 123, region: droplet.region.slug)`\n\n## Snapshot resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.snapshots #=\u003e DropletKit::SnapshotResource\n\nActions supported:\n\n* `client.snapshots.all(resource_type: 'droplet')`\n* `client.snapshots.find(id: 'id')`\n* `client.snapshots.delete(id: 'id')`\n\n## VPC resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.vpcs #=\u003e DropletKit::VPCResource\n\nActions supported:\n\n* `client.vpcs.find(id: 'id')`\n* `client.vpcs.all()`\n* `client.vpcs.create(vpc)`\n* `client.vpcs.update(vpc, id: 'id')`\n* `client.vpcs.patch(vpc, id: 'id')`\n* `client.vpcs.delete(id: 'id')`\n* `client.vpcs.all_members(id: 'id')`\n\n## VPC Peering resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.vpc_peerings #=\u003e DropletKit::VPCPeeringResource\n\nActions supported:\n\n* `client.vpc_peerings.find(id: 'id')`\n* `client.vpc_peerings.all()`\n* `client.vpc_peerings.create(vpc_peering)`\n* `client.vpc_peerings.update(vpc_peering, id: 'id')`\n* `client.vpc_peerings.patch(vpc_peering, id: 'id')`\n* `client.vpc_peerings.delete(id: 'id')`\n\n## Container Registry resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.container_registry #=\u003e DropletKit::ContainerRegistryResource\n\nActions supported:\n\n* `client.container_registry.get()`\n* `client.container_registry.create(registry)`\n* `client.container_registry.delete()`\n* `client.container_registry.docker_credentials()`\n\n## Container Registry Repository resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.container_registry_repository #=\u003e DropletKit::ContainerRegistryRepositoryResource\n\nActions supported:\n\n* `client.container_registry_repository.all(registry_name: 'registry')`\n* `client.container_registry_repository.tags(registry_name: 'registry', repository: 'repo')`\n* `client.container_registry_repository.delete_tag(registry_name: 'registry', repository: 'repo', tag: 'tag')`\n* `client.container_registry_repository.delete_manifest(registry_name: 'registry', repository: 'repo', manifest_digest: 'sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221')`\n\n## 1-Click Applications resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.one_clicks #=\u003e DropletKit::OneClickResource\n\nActions supported:\n\n* `client.one_clicks.all(type: 'kubernetes|droplet')`\n* `client.one_clicks.create_kubernetes(one_click_kubernetes)`\n\n## App resource\n\n    client = DropletKit::Client.new(access_token: 'TOKEN')\n    client.apps #=\u003e DropletKit::AppResource\n\nActions supported:\n\n* `client.apps.all(with_projects: bool)`\n* `client.apps.find(id: 'id')`\n* `client.apps.create(app)`\n* `client.apps.update(app, id: 'id')`\n* `client.apps.delete(id: 'id')`\n\n## Contributing\n\n1. Fork it ( https://github.com/digitalocean/droplet_kit/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Releasing\nSee [RELEASE](RELEASE.md) for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fdroplet_kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalocean%2Fdroplet_kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fdroplet_kit/lists"}