++ed by:
ADAMJS SZABGAB

2 PAUSE users
4 non-PAUSE users.

Adam Hopkins

NAME

DigitalOcean::Image - Represents a Region object in the DigitalOcean API

VERSION

version 0.16

SYNOPSIS

    FILL ME IN   

DESCRIPTION

FILL ME IN

METHODS

id

A unique number that can be used to identify and reference a specific image.

name

The display name that has been given to an image. This is what is shown in the control panel and is generally a descriptive title for the image in question.

type

The kind of image, describing the duration of how long the image is stored. This is one of "snapshot", "temporary" or "backup".

distribution

This attribute describes the base distribution used for this image.

slug

A uniquely identifying string that is associated with each of the DigitalOcean-provided public images. These can be used to reference a public image as an alternative to the numeric id.

public

This is a boolean value that indicates whether the image in question is public or not. An image that is public is available to all accounts. A non-public image is only accessible from your account.

regions

This attribute is an array of the regions that the image is available in. The regions are represented by their identifying slug values.

min_disk_size

The minimum 'disk' required for a size to use this image.

created_at

A time value given in ISO8601 combined date and time format that represents when the Image was created.

path

Returns the api path for this domain

actions

This will retrieve all actions that have been executed on an Image by returning a DigitalOcean::Collection that can be used to iterate through the DigitalOcean::Action objects of the actions collection.

    my $actions_collection = $image->actions;
    my $obj;

    while($obj = $actions_collection->next) { 
        print $obj->id . "\n";
    }

If you would like a different per_page value to be used for this collection instead of per_page, it can be passed in as a parameter:

    #set default for all collections to be 30
    $do->per_page(30);

    #set this collection to have 2 objects returned per page
    my $actions_collection = $image->actions(2);
    my $obj;

    while($obj = $actions_collection->next) { 
        print $obj->id . "\n";
    }

update

This method edits an existing image.

  • name Required, String, The new name that you would like to use for the image.

    my $updated_image = $image->update(name => 'newname');

This method returns the updated DigitalOcean::Image.

delete

This deletes an image. This will return 1 on success and undef on failure.

transfer

This method transfers an image to another region. It returns a DigitalOcean::Action object.

  • region Required, String, The region slug that represents the region target.

    my $action = $image->transfer(region => 'nyc2');

convert

This method converts an image to a snapshot, such as a backup to a snapshot. It returns a DigitalOcean::Action object.

    my $action = $image->convert;

action

This will retrieve an action associated with the DigitalOcean::Image object by id and return a DigitalOcean::Action object.

    my $action = $image->action(56789);

id

Actions

AUTHOR

Adam Hopkins <srchulo@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Adam Hopkins.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.