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

    Interface ImagesRequestBuilder

    Builds and executes requests for operations under /v2/images

    interface ImagesRequestBuilder {
        byImage_id(image_id: number): WithImage_ItemRequestBuilder;
        get(
            requestConfiguration?: RequestConfiguration<
                ImagesRequestBuilderGetQueryParameters,
            >,
        ): Promise<undefined | ImagesGetResponse>;
        post(
            body: Image_new_custom,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | ImagesPostResponse>;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<
                ImagesRequestBuilderGetQueryParameters,
            >,
        ): RequestInformation;
        toPostRequestInformation(
            body: Image_new_custom,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): ImagesRequestBuilder;
    }

    Hierarchy

    Index

    Methods

    • To list all of the images available on your account, send a GET request to /v2/images.## Filtering Results-----It's possible to request filtered results by including certain query parameters.Image TypeEither 1-Click Application or OS Distribution images can be filtered by using the type query parameter.> Important: The type query parameter does not directly relate to the type attribute.To retrieve only distribution images, include the type query parameter set to distribution, /v2/images?type=distribution.To retrieve only application images, include the type query parameter set to application, /v2/images?type=application.User ImagesTo retrieve only the private images of a user, include the private query parameter set to true, /v2/images?private=true.TagsTo list all images assigned to a specific tag, include the tag_name query parameter set to the name of the tag in your GET request. For example, /v2/images?tag_name=$TAG_NAME.

      Parameters

      Returns Promise<undefined | ImagesGetResponse>

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

      To create a new custom image, send a POST request to /v2/images.The body must contain a url attribute pointing to a Linux virtual machineimage to be imported into DigitalOcean.The image must be in the raw, qcow2, vhdx, vdi, or vmdk format.It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed.

      Parameters

      • body: Image_new_custom

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | ImagesPostResponse>

      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

    • To list all of the images available on your account, send a GET request to /v2/images.## Filtering Results-----It's possible to request filtered results by including certain query parameters.Image TypeEither 1-Click Application or OS Distribution images can be filtered by using the type query parameter.> Important: The type query parameter does not directly relate to the type attribute.To retrieve only distribution images, include the type query parameter set to distribution, /v2/images?type=distribution.To retrieve only application images, include the type query parameter set to application, /v2/images?type=application.User ImagesTo retrieve only the private images of a user, include the private query parameter set to true, /v2/images?private=true.TagsTo list all images assigned to a specific tag, include the tag_name query parameter set to the name of the tag in your GET request. For example, /v2/images?tag_name=$TAG_NAME.

      Parameters

      Returns RequestInformation

    • To create a new custom image, send a POST request to /v2/images.The body must contain a url attribute pointing to a Linux virtual machineimage to be imported into DigitalOcean.The image must be in the raw, qcow2, vhdx, vdi, or vmdk format.It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed.

      Parameters

      • body: Image_new_custom

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • Parameters

      • rawUrl: string

      Returns ImagesRequestBuilder