The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

VM::HetznerCloud::API::Images - Images

VERSION

version 0.0.3

SYNOPSIS

    use VM::HetznerCloud;

    my $api_key = '1234abc';
    my $cloud   = VM::HetznerCloud->new(
        token => $api_key,
    );

    $cloud->records->create(
    );

ATTRIBUTES

  • endpoint

METHODS

list

Returns all Image objects. You can select specific Image types only and sort the results by using URI parameters.

    $cloud->images->list(
        architecture => 'test',
        bound_to => 'test',
        include_deprecated => 'test',
        label_selector => 'test',
        name => 'test',
        sort => 'test',
        status => 'test',
        type => 'test',
    );

delete

Deletes an Image. Only Images of type `snapshot` and `backup` can be deleted.

    $cloud->images->delete(
        id => 'test',
    );

get

Returns a specific Image object.

    $cloud->images->get(
        id => 'test',
    );

put

Updates the Image. You may change the description, convert a Backup Image to a Snapshot Image or change the Image labels. Only Images of type `snapshot` and `backup` can be updated.

Note that when updating labels, the current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.

    $cloud->images->put(
        id => 'test',
    );

list_actions

Returns all Action objects for an Image. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter.

    $cloud->images->list_actions(
        id => 'test',
        sort => 'test',
        status => 'test',
    );

change_protection

Changes the protection configuration of the Image. Can only be used on snapshots.

    $cloud->images->change_protection(
        id => 'test',
    );

get_actions

Returns a specific Action for an Image.

    $cloud->images->get_actions(
        action_id => 'test',
        id => 'test',
    );

AUTHOR

Renee Baecker <reneeb@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2018 by Renee Baecker.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)