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

    Interface ActionsRequestBuilder

    Builds and executes requests for operations under /v2/volumes/{volume_id}/actions

    interface ActionsRequestBuilder {
        byAction_id(action_id: number): WithAction_ItemRequestBuilder;
        get(
            requestConfiguration?: RequestConfiguration<
                ActionsRequestBuilderGetQueryParameters,
            >,
        ): Promise<undefined | ActionsGetResponse>;
        post(
            body:
                | Volume_action_post_attach
                | Volume_action_post_detach
                | Volume_action_post_resize,
            requestConfiguration?: RequestConfiguration<
                ActionsRequestBuilderPostQueryParameters,
            >,
        ): Promise<undefined | ActionsPostResponse>;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<
                ActionsRequestBuilderGetQueryParameters,
            >,
        ): RequestInformation;
        toPostRequestInformation(
            body:
                | Volume_action_post_attach
                | Volume_action_post_detach
                | Volume_action_post_resize,
            requestConfiguration?: RequestConfiguration<
                ActionsRequestBuilderPostQueryParameters,
            >,
        ): RequestInformation;
        withUrl(rawUrl: string): ActionsRequestBuilder;
    }

    Hierarchy

    Index

    Methods

    • To retrieve all actions that have been executed on a volume, send a GET request to /v2/volumes/$VOLUME_ID/actions.

      Parameters

      Returns Promise<undefined | ActionsGetResponse>

      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

    post

    • post(
          body:
              | Volume_action_post_attach
              | Volume_action_post_detach
              | Volume_action_post_resize,
          requestConfiguration?: RequestConfiguration<
              ActionsRequestBuilderPostQueryParameters,
          >,
      ): Promise<undefined | ActionsPostResponse>

      To initiate an action on a block storage volume by Id, send a POST request to~/v2/volumes/$VOLUME_ID/actions. The body should contain the appropriateattributes for the respective action.## Attach a Block Storage Volume to a Droplet| Attribute | Details || ---------- | ------------------------------------------------------------------- || type | This must be attach || droplet_id | Set to the Droplet's ID || region | Set to the slug representing the region where the volume is located |Each volume may only be attached to a single Droplet. However, up to fifteenvolumes may be attached to a Droplet at a time. Pre-formatted volumes will beautomatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOSDroplets created on or after April 26, 2018 when attached. On older Droplets,additional configurationis required.## Remove a Block Storage Volume from a Droplet| Attribute | Details || ---------- | ------------------------------------------------------------------- || type | This must be detach || droplet_id | Set to the Droplet's ID || region | Set to the slug representing the region where the volume is located |## Resize a Volume| Attribute | Details || -------------- | ------------------------------------------------------------------- || type | This must be resize || size_gigabytes | The new size of the block storage volume in GiB (1024^3) || region | Set to the slug representing the region where the volume is located |Volumes may only be resized upwards. The maximum size for a volume is 16TiB.

      Parameters

      • body:
            | Volume_action_post_attach
            | Volume_action_post_detach
            | Volume_action_post_resize

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<ActionsRequestBuilderPostQueryParameters>

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

      Returns Promise<undefined | ActionsPostResponse>

      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 initiate an action on a block storage volume by Id, send a POST request to~/v2/volumes/$VOLUME_ID/actions. The body should contain the appropriateattributes for the respective action.## Attach a Block Storage Volume to a Droplet| Attribute | Details || ---------- | ------------------------------------------------------------------- || type | This must be attach || droplet_id | Set to the Droplet's ID || region | Set to the slug representing the region where the volume is located |Each volume may only be attached to a single Droplet. However, up to fifteenvolumes may be attached to a Droplet at a time. Pre-formatted volumes will beautomatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOSDroplets created on or after April 26, 2018 when attached. On older Droplets,additional configurationis required.## Remove a Block Storage Volume from a Droplet| Attribute | Details || ---------- | ------------------------------------------------------------------- || type | This must be detach || droplet_id | Set to the Droplet's ID || region | Set to the slug representing the region where the volume is located |## Resize a Volume| Attribute | Details || -------------- | ------------------------------------------------------------------- || type | This must be resize || size_gigabytes | The new size of the block storage volume in GiB (1024^3) || region | Set to the slug representing the region where the volume is located |Volumes may only be resized upwards. The maximum size for a volume is 16TiB.

      Parameters

      • body:
            | Volume_action_post_attach
            | Volume_action_post_detach
            | Volume_action_post_resize

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<ActionsRequestBuilderPostQueryParameters>

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

      Returns RequestInformation

    • Parameters

      • rawUrl: string

      Returns ActionsRequestBuilder