Infoblox::Notification::Rule - A notification rule object.
The notification rule object provides configuration for notification of endpoints when the appropriate event occurs.
my $notification_rule = Infoblox::Notification::Rule->new( event_type => 'DNS_RPZ' | 'DHCP_LEASES' | 'SECURITY_ADP' | 'IPAM', # Required expression_list => [$rule_op1, $rule_op2, ...], # Required name => $string, # Required notification_action => 'CISCOISE_QUARANTINE' | 'CISCOISE_PUBLISH' | 'RESTAPI_TEMPLATE_INSTANCE', # Required notification_target => $ise_endpoint | $rest_endpoint | $dxl_endpoint # Required all_members => 'true' | 'false', # Optional / if no selected_members given default is 'true' comment => $string, # Optional / Default is undefined disable => 'true' | 'false', # Optional / Default is 'false' override_publish_settings => 'true' | 'false', # Optional default is 'false' publish_settings => $publish_settings, # Optional / Default is undefined selected_members => [$member1, $member2, ...], # Optional / Default is empty list template_instance => $instance, # Optional / Default is undefined enable_event_deduplication => 'true' | 'false', # Optional / Default is 'false' event_deduplication_lookback_period => $uint, # Optional / Default is 600 enable_event_deduplication_log => 'true' | 'false', # Optional / Default is 'false' event_deduplication_fields => [ 'SOURCE_IP' | 'QUERY_NAME' | 'RPZ_POLICY' | 'RPZ_TYPE' | 'QUERY_TYPE' | 'NETWORK' | 'NETWORK_VIEW', ... ], # Optional / Default is empty list # Required if enable_event_deduplication is set to 'true' );
This section describes all the methods in an Infoblox::Session module that you can apply to a notification rule object.
Use this method to add the object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values.
#Construct an object my $object = Infoblox::Notification::Rule->new( event_type => 'DNS_RPZ', expression_list => [$rule_start_list, $rule_op1, $rule_op2, $rule_end_list], name => 'ise_rule1', notification_action => 'CISCOISE_QUARANTINE', notification_target => $endpoint, );
#Submit for addition my $response = $session->add($object);
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 notification rule object:
comment - Optional. The notification rule comment in string format. name - Optional. The notification rule name in string format. event_type - Optional. The notification rule event type in string format. notification_action - Optional. The notification rule notification action in string format. notification_target - Optional. The Infoblox::CiscoISE::Endpoint, Infoblox::Notification::REST::Endpoint or Infoblox::DXL::Endpoint object.
my @retrieved_objs = $session->get( object => 'Infoblox::Notification::Rule', name => 'ise_rule1', );
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 DHCP range object, and then submit this object for removal.
#Get the objects my @retrieved_objs = $session->get( object => 'Infoblox::Notification::Rule', name => 'ise_rule1', );
#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 notification rule object:
comment - Optional. The notification rule comment in string format (regexp). name - Optional. The notification rule name in string format (regexp). event_type - Optional. The notification rule event type in string format (exact) notification_action - Optional. The notification rule notification action in string format (exact). notification_target - Optional. The Infoblox::CiscoISE::Endpoint, Infoblox::Notification::REST::Endpoint or Infoblox::DXL::Endpoint object.
# search for objects my @retrieved_objs = $session->search( object => 'Infoblox::Notification::Rule', name => '^ise.*', comment => '.*comment', );
This section describes all the methods that you can use to configure and retrieve the attribute values of a notification rule.
Use this method to set or retrieve the flag that indicates whether the notification rule engine is run on all member or on selected members.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify 'true' to run notification rule engine on all members, or 'false' to run it on selected members. The default value unless selected_members are given is 'true'.
If you 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 all_members value my $all_members = $object->all_members();
#Modify all_members value $object->all_members('false');
Use this method to set or retrieve the notification rule 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 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('ise comment');
Use this method to set or retrieve the flag that indicates whether the notification rule is enabled or disabled.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify 'true' to disable the notification rule or 'false' to enable it. The default value is 'false'.
If you 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 disable value my $disable = $object->disable();
#Modify disable value $object->disable('false');
Use this method to set or retrieve the flag that indicates whether the notification rule for event deduplication is enabled or disabled.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify 'true' to enable event deduplication or 'false' to disable it. The default value is 'false'.
If you 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 enable_event_deduplication value my $enable_event_deduplication = $object->enable_event_deduplication();
#Modify enable_event_deduplication value $object->enable_event_deduplication('true');
Use this method to set or retrieve the flag that indicates whether the notification rule event deduplication syslog is enabled or disabled.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify 'true' to enable event deduplication syslog or 'false' to disable it. The default value is 'false'.
If you 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 enable_event_deduplication_log value my $enable_event_deduplication_log = $object->enable_event_deduplication_log();
#Modify enable_event_deduplication_log value $object->enable_event_deduplication_log('true');
Use this method to set or retrieve the fields in the notification rule for event deduplication.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an array reference that contains following values: 'SOURCE_IP', 'QUERY_NAME', 'RPZ_POLICY', 'RPZ_TYPE', 'QUERY_TYPE', 'NETWORK', 'NETWORK_VIEW'.
If you 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 event_deduplication_fields value my $event_deduplication_fields = $object->event_deduplication_fields();
#Modify event_deduplication_fields value $object->event_deduplication_fields(['SOURCE_IP', 'QUERY_TYPE']);
Use this method to set or retrieve the lookback period for the notification rule for event deduplication.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an unsigned integer between 5 and 900 that represents the lookback period (in seconds).
If you 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 event_deduplication_lookback_period value my $event_deduplication_lookback_period = $object->event_deduplication_lookback_period();
#Modify event_deduplication_lookback_period value $object->event_deduplication_lookback_period(300);
Use this method to set or retrieve the notification rule event type.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid values are 'DNS_RPZ', 'IPAM', 'DHCP_LEASES', 'ANALYTICS_DNS_TUNNEL', 'SECURITY_ADP', 'DB_CHANGE_DHCP_FIXED_ADDRESS_IPV4', 'DB_CHANGE_DHCP_FIXED_ADDRESS_IPV6', 'DB_CHANGE_DHCP_NETWORK_IPV4', 'DB_CHANGE_DHCP_NETWORK_IPV6', 'DB_CHANGE_DHCP_RANGE_IPV4', 'DB_CHANGE_DHCP_RANGE_IPV6', 'DB_CHANGE_DNS_HOST_ADDRESS_IPV4' and 'DB_CHANGE_DNS_HOST_ADDRESS_IPV6'.
If you 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 event_type value my $event_type = $object->event_type();
#Modify event_type value $object->event_type('SECURITY_ADP');
Use this method to set or retrieve the notification rule condition expression.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an array of Infoblox::Notification::RuleExpressionOp objects.
If you 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 expression_list value my $expression_list = $object->expression_list();
#Set event_type value $object->event_type('SECURITY_ADP');
#Construct ('SECURITY_AD_RULE_SEVERY' LESS_SEVERE 'MAJOR' # AND SOURCE_IP EQUALS '10.0.0.10') expression
my $start_list = Infoblox::Grid::ExpressionOp->new( op1_type => 'LIST', op => 'AND', );
my $op1 = Infoblox::Grid::ExpressionOp->new( op1_type => 'FIELD', op1 => 'SECURITY_AD_RULE_SEVERY', op => 'LE', op2 => 'MAJOR', op2_type => 'STRING', );
my $op2 = Infoblox::Grid::ExpressionOp->new( op1_type => 'FIELD', op1 => 'SOURCE_IP', op => 'EQ', op2 => '10.0.0.10', op2_type => 'STRING', );
my $end_list = Infoblox::Grid::ExpressionOp->new( op1_type => 'LIST', op => 'ENDLIST', );
#Modify expression_list value $object->expression_list([$start_list, $op1, $op2, $end_list]);
Use this method to set or retrieve the notification rule 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 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('rule1');
Use this method to set or retrieve the notification rule action.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid values are 'CISCOISE_QUARANTINE', 'CISCOISE_PUBLISH' and 'RESTAPI_TEMPLATE_INSTANCE'.
If you 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 notification_action value my $notification_action = $object->notification_action();
#Modify notification_action value $object->notification_action('CISCOISE_QUARANTINE');
Use this method to set or retrieve the notification rule target.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an Infoblox::CiscoISE::Endpoint, Infoblox::Notification::REST::Endpoint or Infoblox::DXL::Endpoint object.
If you 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 notification_target value my $notification_target = $object->notification_target();
#Modify notification_target value $object->notification_target($endpoint);
The override_publish_settings attribute controls whether the publish_settings method values of the member are used, instead of the target endpoint default.
The override_publish_settings attribute can be specified explicitly. It is also set implicitly when publish_settings is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Set the parameter to "true" to override the endpoint level setting for publish_settings. Set the parameter to "false" to inherit the endpoint level setting for publish_settings.
The default value of this parameter is "false".
If you 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 override_publish_settings value my $override_publish_settings = $object->override_publish_settings( ); #Modify override_publish_settings value $object->override_publish_settings("true");
Use this method to set or retrieve the notification rule publish settings.
Setting this method to a defined value implicitly sets the override_publish_settings method to "true". Setting the parameter to undefined causes the appliance to use the endpoint default and automatically resets the override_publish_settings method to "false".
Note that when publish_settings is set to a defined value and override_publish_settings is set to "false", the last operation takes precedence. Thus the sequence $object->publish_settings($value); $object->override_publish_settings("false"); will set override_publish_settings to "false", and the sequence $object->override_publish_settings("false"); $object->publish_settings($value); will result in override_publish_settings="true".
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an Infoblox::CiscoISE::PublishSetting object.
If you 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 publish_settings value my $publish_settings = $object->publish_settings();
#Modify publish_settings value $object->publish_settings($publish_settings);
Use this method to set or retrieve the member host names on which you run the publish engine.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an array of desired selected member host names in string format.
If you 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 selected_members value my $selected_members = $object->selected_members();
#Modify selected_members value $object->selected_members(['member1.com', 'member2.com']);
Use this method to set or retrieve the REST API template instance.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an Infoblox::Notification::REST::TemplateInstance object.
If you 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 template_instance value my $template_instance = $object->template_instance();
#Modify template_instance value $object->template_instance($instance);
Infoblox Inc. http://www.infoblox.com/
Infoblox::Session, Infoblox::Session->add(), Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->remove(), Infoblox::Session->search(), Infoblox::CiscoISE::PublishSetting, Infoblox::CiscoISE::Endpoint, Infoblox::DXL::Endpoint, Infoblox::Notification::RuleExpressionOp, Infoblox::Notification::REST::Endpoint, Infoblox::Notification::REST::TemplateInstance,
Copyright (c) 2017 Infoblox Inc.