@digitalocean/dots - v1.0.1
    Preparing search index...

    Interface VolumesRequestBuilder

    Builds and executes requests for operations under /v2/volumes

    interface VolumesRequestBuilder {
        get actions(): ActionsRequestBuilder;
        get snapshots(): SnapshotsRequestBuilder;
        byVolume_id(volume_id: string): WithVolume_ItemRequestBuilder;
        delete(
            requestConfiguration?: RequestConfiguration<
                VolumesRequestBuilderDeleteQueryParameters,
            >,
        ): Promise<void>;
        get(
            requestConfiguration?: RequestConfiguration<
                VolumesRequestBuilderGetQueryParameters,
            >,
        ): Promise<undefined | VolumesGetResponse>;
        post(
            body: Volumes_ext4 | Volumes_xfs,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | VolumesPostResponse>;
        toDeleteRequestInformation(
            requestConfiguration?: RequestConfiguration<
                VolumesRequestBuilderDeleteQueryParameters,
            >,
        ): RequestInformation;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<
                VolumesRequestBuilderGetQueryParameters,
            >,
        ): RequestInformation;
        toPostRequestInformation(
            body: Volumes_ext4 | Volumes_xfs,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): VolumesRequestBuilder;
    }

    Hierarchy

    Index

    Accessors

    Methods

    • Block storage volumes may also be deleted by name by sending a DELETE request with the volume's name and the region slug for the region it is located in as query parameters to /v2/volumes?name=$VOLUME_NAME&region=nyc1.No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

      Parameters

      Returns Promise<void>

      error when the service returns a 401 status code

      error when the service returns a 404 status code

      error when the service returns a 429 status code

      error when the service returns a 500 status code

      error when the service returns a 4XX or 5XX status code

    • To list all of the block storage volumes available on your account, send a GET request to /v2/volumes.## Filtering Results### By RegionThe region may be provided as query parameter in order to restrict results to volumes available in a specific region. For example: /v2/volumes?region=nyc1### By NameIt is also possible to list volumes on your account that match a specified name. To do so, send a GET request with the volume's name as a query parameter to /v2/volumes?name=$VOLUME_NAME.Note: You can only create one volume per region with the same name.### By Name and RegionIt is also possible to retrieve information about a block storage volume by name. To do so, send a GET request with the volume's name and the region slug for the region it is located in as query parameters to /v2/volumes?name=$VOLUME_NAME&region=nyc1.

      Parameters

      Returns Promise<undefined | VolumesGetResponse>

      error when the service returns a 401 status code

      error when the service returns a 429 status code

      error when the service returns a 500 status code

      error when the service returns a 4XX or 5XX status code

    post

    • post(
          body: Volumes_ext4 | Volumes_xfs,
          requestConfiguration?: RequestConfiguration<object>,
      ): Promise<undefined | VolumesPostResponse>

      To create a new volume, send a POST request to /v2/volumes. Optionally, a filesystem_type attribute may be provided in order to automatically format the volume's filesystem. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to Droplets without support for auto-mounting is not recommended.

      Parameters

      • body: Volumes_ext4 | Volumes_xfs

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

        Configuration for the request such as headers, query parameters, and middleware options.

      Returns Promise<undefined | VolumesPostResponse>

      error when the service returns a 400 status code

      error when the service returns a 401 status code

      error when the service returns a 404 status code

      error when the service returns a 429 status code

      error when the service returns a 500 status code

      error when the service returns a 4XX or 5XX status code

    • Block storage volumes may also be deleted by name by sending a DELETE request with the volume's name and the region slug for the region it is located in as query parameters to /v2/volumes?name=$VOLUME_NAME&region=nyc1.No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

      Parameters

      Returns RequestInformation

    • To list all of the block storage volumes available on your account, send a GET request to /v2/volumes.## Filtering Results### By RegionThe region may be provided as query parameter in order to restrict results to volumes available in a specific region. For example: /v2/volumes?region=nyc1### By NameIt is also possible to list volumes on your account that match a specified name. To do so, send a GET request with the volume's name as a query parameter to /v2/volumes?name=$VOLUME_NAME.Note: You can only create one volume per region with the same name.### By Name and RegionIt is also possible to retrieve information about a block storage volume by name. To do so, send a GET request with the volume's name and the region slug for the region it is located in as query parameters to /v2/volumes?name=$VOLUME_NAME&region=nyc1.

      Parameters

      Returns RequestInformation

    • To create a new volume, send a POST request to /v2/volumes. Optionally, a filesystem_type attribute may be provided in order to automatically format the volume's filesystem. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to Droplets without support for auto-mounting is not recommended.

      Parameters

      • body: Volumes_ext4 | Volumes_xfs

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

        Configuration for the request such as headers, query parameters, and middleware options.

      Returns RequestInformation

    • Parameters

      • rawUrl: string

      Returns VolumesRequestBuilder