Infoblox::Notification::REST::Template - REST API template object.


NAME

Infoblox::Notification::REST::Template - REST API template object.


DESCRIPTION

The REST API template object used to define particular template configuration.


CONSTRUCTOR

 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'
 );


SESSION METHODS

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.

Infoblox::Session->get( )

Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values.

Key References
 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.
Examples
 my @retrieved_objs = $session->get(
     object => 'Infoblox::Notification::REST::Template',
     name   => 'template1',
 );

Infoblox::Session->modify( )

Use this method to modify the object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values.

Example
 #Modify comment value
 $object->comment('this is a modified comment');
 #Submit modification
 my $response = $session->modify($object);

Infoblox::Session->remove( )

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.

Example
 #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);

Infoblox::Session->search( )

Use this method to search for objects in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values.

Key References
 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.
Examples
 # search for objects
 my @retrieved_objs = $session->search(
     object => 'Infoblox::Notification::REST::Template',
     name   => 'templ.*',
 );


METHODS

This section describes all the methods that you can use to configure and retrieve the attribute values of a REST API template instance object.

action_name( )

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.

Parameter

None

Returns

The method returns the attribute value.

Example
 #Get action_name value
 my $action_name = $object->action_name();

added_on( )

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.

Parameter

None

Returns

The method returns the attribute value, the number of seconds that have elapsed since January 1st, 1970.

Example
 #Get added_on value
 my $added_on = $object->added_on();

comment( )

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.

Parameter

The valid value is a desired comment in string format.

Returns

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.

Example
 #Get comment value
 my $comment = $object->comment();
 #Modify comment value
 $object->comment('new comment');

content( )

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.

Parameter

The valid value is an well formed JSON string.

Returns

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.

Example
 #Get content value
 my $content = $object->content();
 #Modify content value
 $object->content($content);

event_type( )

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.

Parameter

None

Returns

The method returns the attribute value.

Example
 #Get event_type value
 my $event_type = $object->event_type();

name( )

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.

Parameter

The valid value is a desired name in string format.

Returns

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.

Example
 #Get name value
 my $name = $object->name();
 #Modify name value
 $object->name('new_name');

outbound_type( )

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.

Parameter

The valid value is 'REST' or 'DXL'. The default value is 'REST'.

Returns

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.

Example
 #Get outbound_type value
 my $outbound_type = $object->outbound_type();
 #Modify outbound_type value
 $object->outbound_type('DXL');

template_type( )

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.

Parameter

None

Returns

The method returns the attribute value.

Example
 #Get template_type value
 my $template_type = $object->template_type();

vendor_identifier( )

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.

Parameter

None

Returns

The method returns the attribute value.

Example
 #Get vendor_identifier value
 my $vendor_identifier = $object->vendor_identifier();


AUTHOR

Infoblox Inc. http://www.infoblox.com/


SEE ALSO

Infoblox::Session, Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->remove(), Infoblox::Session->search(), Infoblox::Session->import_data()


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.