Infoblox::Notification::REST::Template - REST API template object.
The REST API template object used to define particular template configuration.
my $templ = Infoblox::Notification::REST::Template->new( name => $string, #Required content => $string, #Required comment => $string, #Optional / Default is undefined outbound_type => 'REST' | 'DXL', #Optional / Default is 'REST' );
This section describes all the methods in an Infoblox::Session module that you can apply to a REST API template object.
Note that template object does not support 'add' method. Use Infoblox::Session->import_data() of a 'restapi_template' type instead.
Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values.
Apply the following attributes to get a specific REST API template object:
comment - Optional. The REST API template comment in string format. name - Optional. The REST API template name in string format. action_name - Optional. The REST API template action name in string format. outbound_type - Optional. The template type.
my @retrieved_objs = $session->get( object => 'Infoblox::Notification::REST::Template', name => 'template1', );
Use this method to modify the object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values.
#Modify comment value $object->comment('this is a modified comment');
#Submit modification my $response = $session->modify($object);
Use this method to remove the object from the Infoblox appliance. See Infoblox::Session->remove() for parameters and return values.
To remove a specific object, first use get()
or search()
to retrieve the specific REST API template object, and then submit this object for removal.
#Get the objects my @retrieved_objs = $session->get( object => 'Infoblox::Notification::REST::Template', name => 'template1', );
#Find the desired object from the retrieved list my $desired_object = $retrieved_objs[0];
#Submit for removal my $response = $session->remove($desired_object);
Use this method to search for objects in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values.
Apply the following attributes to search for the REST API template object:
comment - Optional. The REST API template comment in string format (regexp). name - Optional. The REST API template name in string format (regexp). action_name - Optional. The REST API template action name in string format (regexp). outbound_type - Optional. The template type.
# search for objects my @retrieved_objs = $session->search( object => 'Infoblox::Notification::REST::Template', name => 'templ.*', );
This section describes all the methods that you can use to configure and retrieve the attribute values of a REST API template instance object.
Use this method to retrieve the template action name. This is a read-only attribute.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
None
The method returns the attribute value.
#Get action_name value my $action_name = $object->action_name();
Use this method to retrieve the timestamp the template was added. This is a read-only attribute.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
None
The method returns the attribute value, the number of seconds that have elapsed since January 1st, 1970.
#Get added_on value my $added_on = $object->added_on();
Use this method to set or retrieve the descriptive comment.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is a desired comment in string format.
If you have specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get comment value my $comment = $object->comment();
#Modify comment value $object->comment('new comment');
Use this method to set or retrieve the template content.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an well formed JSON string.
If you have specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get content value my $content = $object->content();
#Modify content value $object->content($content);
Use this method to retrieve the template event type. This is a read-only attribute.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
None
The method returns the attribute value.
#Get event_type value my $event_type = $object->event_type();
Use this method to set or retrieve the template name.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is a desired name in string format.
If you have specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get name value my $name = $object->name();
#Modify name value $object->name('new_name');
Use this method to set or retrieve the outbound type for the template.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is 'REST' or 'DXL'. The default value is 'REST'.
If you have specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get outbound_type value my $outbound_type = $object->outbound_type();
#Modify outbound_type value $object->outbound_type('DXL');
Use this method to retrieve the template type. This is a read-only attribute.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
None
The method returns the attribute value.
#Get template_type value my $template_type = $object->template_type();
Use this method to retrieve the template vendor identifier. This is a read-only attribute.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
None
The method returns the attribute value.
#Get vendor_identifier value my $vendor_identifier = $object->vendor_identifier();
Infoblox Inc. http://www.infoblox.com/
Infoblox::Session, Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->remove(), Infoblox::Session->search(), Infoblox::Session->import_data()
Copyright (c) 2017 Infoblox Inc.