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

    Interface ActionsRequestBuilder

    Builds and executes requests for operations under /v2/images/{image_id}/actions

    interface ActionsRequestBuilder {
        byAction_id(action_id: number): WithAction_ItemRequestBuilder;
        get(
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | ActionsGetResponse>;
        post(
            body: Image_action_base | Image_action_transfer,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | Action>;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        toPostRequestInformation(
            body: Image_action_base | Image_action_transfer,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): ActionsRequestBuilder;
    }

    Hierarchy

    Index

    Methods

    • To retrieve all actions that have been executed on an image, send a GET request to /v2/images/$IMAGE_ID/actions.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      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: Image_action_base | Image_action_transfer,
          requestConfiguration?: RequestConfiguration<object>,
      ): Promise<undefined | Action>

      The following actions are available on an Image.## Convert an Image to a SnapshotTo convert an image, for example, a backup to a snapshot, send a POST requestto /v2/images/$IMAGE_ID/actions. Set the type attribute to convert.## Transfer an ImageTo transfer an image to another region, send a POST request to/v2/images/$IMAGE_ID/actions. Set the type attribute to transfer and setregion attribute to the slug identifier of the region you wish to transferto.

      Parameters

      • body: Image_action_base | Image_action_transfer

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | Action>

      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 retrieve all actions that have been executed on an image, send a GET request to /v2/images/$IMAGE_ID/actions.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • The following actions are available on an Image.## Convert an Image to a SnapshotTo convert an image, for example, a backup to a snapshot, send a POST requestto /v2/images/$IMAGE_ID/actions. Set the type attribute to convert.## Transfer an ImageTo transfer an image to another region, send a POST request to/v2/images/$IMAGE_ID/actions. Set the type attribute to transfer and setregion attribute to the slug identifier of the region you wish to transferto.

      Parameters

      • body: Image_action_base | Image_action_transfer

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • Parameters

      • rawUrl: string

      Returns ActionsRequestBuilder