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

    Interface SnapshotsRequestBuilder

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

    interface SnapshotsRequestBuilder {
        get(
            requestConfiguration?: RequestConfiguration<
                SnapshotsRequestBuilderGetQueryParameters,
            >,
        ): Promise<undefined | SnapshotsGetResponse>;
        post(
            body: SnapshotsPostRequestBody,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | SnapshotsPostResponse>;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<
                SnapshotsRequestBuilderGetQueryParameters,
            >,
        ): RequestInformation;
        toPostRequestInformation(
            body: SnapshotsPostRequestBody,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): SnapshotsRequestBuilder;
    }

    Hierarchy

    Index

    Methods

    • To retrieve the snapshots that have been created from a volume, send a GET request to /v2/volumes/$VOLUME_ID/snapshots.

      Parameters

      Returns Promise<undefined | SnapshotsGetResponse>

      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: SnapshotsPostRequestBody,
          requestConfiguration?: RequestConfiguration<object>,
      ): Promise<undefined | SnapshotsPostResponse>

      To create a snapshot from a volume, sent a POST request to /v2/volumes/$VOLUME_ID/snapshots.

      Parameters

      • body: SnapshotsPostRequestBody

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | SnapshotsPostResponse>

      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

    • To create a snapshot from a volume, sent a POST request to /v2/volumes/$VOLUME_ID/snapshots.

      Parameters

      • body: SnapshotsPostRequestBody

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • Parameters

      • rawUrl: string

      Returns SnapshotsRequestBuilder