NAME
Net::Cisco::FMC::v1::Role::ObjectMethods - Role for Cisco Firepower Management Center (FMC) API version 1 method generation
VERSION
version 0.010000
SYNOPSIS
package Net::Cisco::FMC::v1;
use Moo;
use Net::Cisco::FMC::v1::Role::ObjectMethods;
Net::Cisco::FMC::v1::Role::ObjectMethods->apply([
{
path => 'object',
object => 'portobjectgroups',
singular => 'portobjectgroup',
},
{
path => 'object',
object => 'protocolportobjects',
singular => 'protocolportobject',
}
]);
1;
DESCRIPTION
This role adds methods for the REST methods of a specific object named.
METHODS
create_$singular
Takes a hashref of attributes.
Returns the created object as hashref.
Throws an exception on error.
list_$object
Takes optional query parameters.
Returns a hashref with a single key 'items' that has a list of hashrefs similar to the FMC API.
Throws an exception on error.
As the API only allows fetching 1000 objects at a time it works around that by making multiple API calls.
get_$singular
Takes an object id and optional query parameters.
Returns the object as hashref.
Throws an exception on error.
update_$singular
Takes an object and a hashref of attributes.
Returns the updated object as hashref.
Throws an exception on error.
delete_$singular
Takes an object id.
Returns true on success.
Throws an exception on error.
find_$singular
Takes query parameters.
Returns the object as hashref on success.
Throws an exception on error.
As there is no API for searching by all attributes this method emulates this by fetching all objects using the list_$object method and performing the search on the client.
AUTHOR
Alexander Hartmaier <abraxxa@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 - 2024 by Alexander Hartmaier.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.