class Vultr::ObjectStorageResource
Public Instance Methods
Source
# File lib/vultr/resources/object_storage.rb, line 8 def create(**attributes) ObjectStorage.new post_request("object-storage", body: attributes).body.dig("object_storage") end
Source
# File lib/vultr/resources/object_storage.rb, line 20 def delete(object_storage_id:) delete_request("object-storage/#{object_storage_id}") end
Source
# File lib/vultr/resources/object_storage.rb, line 3 def list(**params) response = get_request("object-storage", params: params) Collection.from_response(response, key: "object_storages", type: ObjectStorage) end
Source
# File lib/vultr/resources/object_storage.rb, line 28 def list_clusters(**params) response = get_request("object-storage/clusters", params: params) Collection.from_response(response, key: "clusters", type: Object) end
Source
# File lib/vultr/resources/object_storage.rb, line 24 def regenerate_keys(object_storage_id:) Object.new post_request("object-storage/#{object_storage_id}/regenerate-keys", body: {}).body end
Source
# File lib/vultr/resources/object_storage.rb, line 12 def retrieve(object_storage_id:) ObjectStorage.new get_request("object-storage/#{object_storage_id}").body.dig("object_storage") end
Source
# File lib/vultr/resources/object_storage.rb, line 16 def update(object_storage_id:, **attributes) put_request("object-storage/#{object_storage_id}", body: attributes) end