VMware::vCloudDirector2::Object - Module to contain an object!
version 0.108
A weak link to the API object to be used.
The object content. This is in a separate container so that partial objects passed can be inflated at a later stage without having to replace the object itself.
A reference to the hash returned from the vCloud API. Forces object inflation.
Returns VMware::vCloudDirector2::Link objects for each of the JSON targetted links contained in this object. Forces object inflation.
Returns VMware::vCloudDirector2::Link objects for each of the links contained in this object. Will typically return two links per thing - one to the XML version, one to the JSON version. Forces object inflation.
The id attribute from the returned vCloud JSON. Forces object inflation.
This determines, based on the href path, whether or not this is an admin object.
If this object is a partial object (ie taken from a link or partial chunk within a containing object), then this forces a refetch of the content from vCloud creating a fully populated object.
Forces a refetch of this object's content unconditionally.
Returns any links found that match the search criteria. The possible criteria are:-
The name of the link
The type of the link (short type, not full MIME type)
The rel of the link
The return value is a list of link objects.
Finds and returns one link that matches the search criteria, exactly as find_links, except that if no links are found an exception is thrown. If multiple links match then the first one returned (normally the first one back from the API) would be returned.
The return value is a single link object.
As per "find_link" except that the link found is fetched and expanded up as an object.
As per "find_links" except that each link found is fetched and expanded up as an object.
Given a type (specifically a key used within the current object hash), grabs the descendants of that key and instantiates them as partial objects (they can then be inflated into full objects).
Similar to build_sub_objects, but builds objects from two levels down.
Similar to build_sub_objects, but builds objects from within a children hash
Make a delete request to the URL in this link. Returns Objects. Failure will generate an exception. See "DELETE" in VMware::vCloudDirector2::API.
Make a get request to the URL in this link. Returns Objects. Failure will generate an exception. See "GET" in VMware::vCloudDirector2::API.
Make a get request to the URL in this link. Returns a decoded hash. Failure will generate an exception. See "GET_hash" in VMware::vCloudDirector2::API.
Make a post request with the specified payload to the URL in this link. Returns Objects. Failure will generate an exception. See "POST" in VMware::vCloudDirector2::API.
Make a put request with the specified payload to the URL in this link. Returns Objects. Failure will generate an exception. See "PUT" in VMware::vCloudDirector2::API.
If this is already an admin object (ie is_admin_object is true), then this object is returned.
is_admin_object
Otherwise, the path is modified to point to the admin API object and the object is fetched. Since this only exists for a subset of objects there is a reasonable chance that just attempting this will lead to an exception being thrown due to a non-existant object being requested.
Nigel Metheringham <nigelm@cpan.org>
This software is copyright (c) 2019 by Nigel Metheringham.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install VMware::vCloudDirector2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VMware::vCloudDirector2
CPAN shell
perl -MCPAN -e shell install VMware::vCloudDirector2
For more information on module installation, please visit the detailed CPAN module installation guide.