class Docr::Endpoints::Volumes
- Docr::Endpoints::Volumes
- Reference
- Object
Overview
The Volumes
class provides methods to interact with volume-related endpoints.
This class uses the client to send requests to the server and handles responses.
Defined in:
docr/endpoints/volumes.crConstructors
-
.new(client : Docr::Client)
Initializes a new
Volumes
instance with the provided client.
Instance Method Summary
-
#client : Docr::Client
A client instance used for making requests.
-
#create(config : Docr::Types::VolumeConfig) : Docr::Types::Volume
Creates a new volume based on the provided configuration.
-
#delete(name : String, force : Bool = false)
Deletes a specific volume by its name.
-
#inspect(name : String) : Docr::Types::Volume
Inspects a specific volume by its name.
-
#list : Docr::Types::VolumeListResponse
Retrieves a list of volumes.
Constructor Detail
Instance Method Detail
Creates a new volume based on the provided configuration.
- config: The configuration for creating the volume.
Returns the created volume.
def delete(name : String, force : Bool = false)
#
Deletes a specific volume by its name.
- name: The name of the volume to delete.
- force: (Optional) Force deletion if true. Default is false.
Does not return any specific value.
def inspect(name : String) : Docr::Types::Volume
#
Inspects a specific volume by its name.
- name: The name of the volume to inspect.
Returns details about the specified volume.
def list : Docr::Types::VolumeListResponse
#
Retrieves a list of volumes.
Returns a response containing a list of volumes.