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

    Interface WithImage_ItemRequestBuilder

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

    interface WithImage_ItemRequestBuilder {
        get actions(): ActionsRequestBuilder;
        delete(requestConfiguration?: RequestConfiguration<object>): Promise<void>;
        get(
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | WithImage_GetResponse>;
        put(
            body: Image_update,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | WithImage_PutResponse>;
        toDeleteRequestInformation(
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        toPutRequestInformation(
            body: Image_update,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): WithImage_ItemRequestBuilder;
    }

    Hierarchy

    Index

    Accessors

    Methods

    • To delete a snapshot or custom image, send a DELETE request to /v2/images/$IMAGE_ID.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      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 retrieve information about an image, send a GET request to/v2/images/$IDENTIFIER.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | WithImage_GetResponse>

      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 update an image, send a PUT request to /v2/images/$IMAGE_ID.Set the name attribute to the new value you would like to use.For custom images, the description and distribution attributes may also be updated.

      Parameters

      • body: Image_update

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | WithImage_PutResponse>

      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 delete a snapshot or custom image, send a DELETE request to /v2/images/$IMAGE_ID.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • To retrieve information about an image, send a GET request to/v2/images/$IDENTIFIER.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • To update an image, send a PUT request to /v2/images/$IMAGE_ID.Set the name attribute to the new value you would like to use.For custom images, the description and distribution attributes may also be updated.

      Parameters

      • body: Image_update

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation