Infoblox::DTC::LBDN - A DTC Load Balanced Domain Name object.
A DTC Load Balanced Domain Name object.
my $lbdn = Infoblox::DTC::LBDN->new( name => $string, #Required lb_method => 'GLOBAL_AVAILABILITY' | 'RATIO' | 'ROUND_ROBIN' | 'TOPOLOGY', #Required patterns => [$pattern1, $pattern2, ...], #Optional / Default is undefined disable => 'true' | 'false', #Optional / Default is 'false' comment => $string, #Optional / Default is undefined persistence => $uint, #Optional / Default is undefined topology => $topology_obj, #Optional / Default is undefined ttl => $uint, #Optional / Default is undefined types => ['A', 'AAAA', 'NAPTR', 'CNAME'], #Optional / Default is ['A', 'AAAA'] override_ttl => 'true' | 'false', #Optional / Default is 'false' pools => [$pool_link_obj1, $pool_link_obj2, ...], #Optional / Default is undefined priority => $uint, #Optional / Default is 1 auth_zones => [$auth_zone1, $auth_zone2, ...], #Optional / Default is undefined extattrs => { $string => $extattr, ... }, #Optional / Default is undefined extensible_attributes => { $string => $string | $num, $string => [ $string | $num, ... ], ... } #Optional / Default is undefined ); You cannot set both extattrs and extensible_attributes attributes at the same time.
This section describes all the methods in a Session module that you can apply to a DTC LBDN object.
Use this method to add an object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values.
#construct an object my $lbdn = Infoblox::DTC::LBDN->new( name => 'load_bal', lb_method => 'GLOBAL_AVAILABILITY', );
#submit for addition my $response = $session->add($lbdn);
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 attribute to get a specific object:
name - Optional. A DTC LBDN name in a string format. comment - Optional. A DTC LBDN comment. fqdn - Optional. A fully qualified domain name (FQDN). extattrs - Optional. A hash reference containing extensible attributes. extensible_attributes - Optional. A hash reference that contains extensible attributes. status_member - Optional. A member that provides the object health status. The default is Grid.
my @retrieved_objs = $session->get( object => 'Infoblox::DTC::LBDN', name => 'load_bal', fqdn => 'lb.com' );
my @retrieved_objs = $session->get( object => 'Infoblox::DTC::LBDN', extensible_attributes => { 'Site' => 'Santa Clara' } );
Use this method to modify an object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values.
#Use method to modify the comment. $lbdn->comment('this is a modified comment'); #Submit modification my $response = $session->modify($lbdn);
Use this method to remove an 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 object, and then submit this object for removal.
#Get the objects with the same name my @retrieved_objs = $session->get( object => 'Infoblox::DTC::LBDN', name => 'load_bal', ); #Find the desired object from the retrieved list. my $desired_lbdn = $retrieved_objs[0]; #Submit for removal my $response = $session->remove($desired_lbdn);
Use this method to search for objects in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values.
Apply the following attribute to get a specific object:
name - Optional. A DTC LBDN name in a string format. comment - Optional. A DTC LBDN comment. fqdn - Optional. A fully qualified domain name (FQDN). extattrs - Optional. A hash reference containing extensible attributes. extensible_attributes - Optional. A hash reference that contains extensible attributes. status_member - Optional. A member that provides the object health status. The default is Grid.
my @retrieved_objs = $session->search( object => 'Infoblox::DTC::LBDN', name => 'load_b.*', fqdn => 'lb.*' );
my @retrieved_objs = $session->search( object => 'Infoblox::DTC::LBDN', extensible_attributes => { 'Site' => 'Santa Clara' } );
This section describes all the methods that you can use to set or retrieve the attribute values of the object.
Use this method to set or retrieve a list of authoritative zones the DTC LBDN is linked to.
Note that two different DTC LBDNs cannot be linked to the same zone if their patterns overlap.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an array containing Infoblox::DNS::Zone 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 auth_zones value my @auth_zones = $lbdn->auth_zones();
#modify auth_zones value $lbdn->auth_zones([$zone1, $zone2]);
Use this method to set or retrieve a descriptive comment.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Desired comment in string format (UTF-8) with a maximum of 256 bytes.
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 = $lbdn->comment();
#modify comment value $lbdn->comment('desired comment');
Use this method to enable or disable a DTC LBDN object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify 'true' to disable an DTC LBDN object or 'false' to enable it.
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 = $lbdn->disable();
#modify disable value $lbdn->disable('true');
Use this method to set or retrieve the extensible attributes associated with a DTC LBDN object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Valid value is a hash reference containing the names of extensible attributes and their associated values (Infoblox::Grid::Extattr 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 extattrs value my $ref_extattrs = $lbdn->extattrs();
#Modify extattrs $lbdn->extattrs({ 'Site' => $extattr1, 'Administrator' => $extattr2 });
Use this method to set or retrieve the extensible attributes associated with a DTC LBDN object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
For valid values for extensible attributes, see Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values.
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 extensible attributes my $ref_extensible_attributes = $lbdn->extensible_attributes();
#Modify extensible attributes $lbdn->extensible_attributes({'Site' => 'Santa Clara', 'Administrator' => ['Peter', 'Tom']});
Use this method to retrieve DTC LBDN health information. This is a read-only attribute.
None
The valid return value is an Infoblox::DTC::Health object.
#get health value my $health = $lbdn->health();
Use this method to set or retrieve a DTC LBDN load balancing method.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid values are 'GLOBAL_AVAILABILITY', 'RATIO', 'ROUND_ROBIN' and 'TOPOLOGY'.
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 lb_method value my $lb_method = $lbdn->lb_method();
#modify lb_method value $lbdn->lb_method('RATIO');
Use this method to set or retrieve the DTC LBDN 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 a 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 = $lbdn->name();
#modify name value $lbdn->name('load_bal1');
The override_ttl attribute controls whether the TTL value in the object is used, instead of the Grid default.
The override_ttl attribute can be specified explicitly. It is also set implicitly when ttl is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify 'true' to set override_ttl flag or 'false' to disable it. 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 override_ttl value my $override_ttl = $lbdn->override_ttl();
#modify override_ttl value $lbdn->override_ttl('true');
Use this method to set or retrieve an array of DNS FQDN patterns. The patterns are used to match DNS query names processed by the DTC LBDN.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an array of FQDN patterns 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 patterns value my @patterns = $lbdn->patterns();
#modify patterns value $lbdn->patterns(['???'.domain.com', '*.test.com', 'test.domain.com']);
Use this method to set or retrieve the maximum time (in seconds) for which client specific DTC LBDN responses are cached.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an unsigned integer. Zero specifies no caching.
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 persistence value my $persistence = $lbdn->persistence();
#modify persistence value $lbdn->persistence(5);
Use this method to set or retrieve the list of pools the DTC LBDN is linked to.
Note that a DTC LBDN linked to a zone must contain at least one enabled pool if lb_method is set to anything other than 'TOPOLOGY'.
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::DTC::Pool::Link 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 pools value my @pools = $lbdn->pools();
#modify pools value $lbdn->pools([$pool_link1, $pool_link2]);
Use this method to set or retrieve the LBDN pattern match priority for "overlapping" DTC LBDN objects.
LBDNs are "overlapping" if they are simultaneously assigned to a zone and have patterns that can match the same FQDN. The matching LBDN with highest priority (lowest ordinal) will be used.
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 1 and 3. The default is 3.
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 priority value my $priority = $object->priority();
#Modify priority value $object->priority(3);
Use this method to set or retrieve topology rules for the 'TOPOLOGY' load balancing method.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an Infoblox::DTC::Topology 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 topology value my $topology = $lbdn->topology();
#modify topology value $lbdn->topology($topology);
Use this method to set a TTL value.
Setting this method to a defined value implicitly sets the override_ttl method to 'true'. Setting the parameter to undefined causes the appliance to use the Grid default and automatically resets the override_ttl attribute to 'false'.
Note that when ttl is set to a defined value and override_ttl is set to 'false', the last operation takes precedence. Thus the sequence $object->ttl(10); $object->override_ttl('false'); will set override_ttl to 'false', and the sequence $object->override_ttl('false'); $object->ttl(10); will result in override_ttl='true'.
The valid value is an unsigned integer.
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 ttl value my $ttl = $lbdn->ttl();
#modify ttl value $lbdn->ttl(10);
Use this method to set or retrieve the list of record types supported by LBDN.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid valid is an array reference that contains any of the following values: 'A', 'AAA', 'NAPTR', 'CNAME'.
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 types value my $types = $lbdn->types();
#modify types value $lbdn->types(['NAPTR']);
Infoblox Inc. http://www.infoblox.com/
Infoblox::Session, Infoblox::Session->add(), Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->remove(), Infoblox::Session->search(), Infoblox::Grid::Extattr, Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values, Infoblox::DTC::Health, Infoblox::DTC::Pool::Link, Infoblox::DTC::Topology.
Copyright (c) 2017 Infoblox Inc.