VMware vSphere Automation SDK Perl The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions
List of all members
Com::Vmware::Vcenter::Host::FilterSpec Class Reference

## Avaliable Methods
public method | set_standalone ()
public method | get_folders ()
public method | get_names ()
public method | get_standalone ()
public method | set_datacenters ()
public method | get_hosts ()
public method | set_clusters ()
public method | get_datacenters ()
public method | set_folders ()
public method | set_names ()
public method | set_connection_states ()
public method | get_clusters ()
public method | new ()
public method | get_connection_states ()
public method | set_hosts ()

## Detailed Description

The `Com::Vmware::Vcenter::Host::FilterSpec` class contains fields used to filter the results when listing hosts (see :func:`Com::Vmware::Vcenter::Host.list` ). If multiple fields are specified, only hosts matching all of the fields match the filter.

## Member Function Documentation

public method Com::Vmware::Vcenter::Host::FilterSpec::get_clusters | ( |  | ) |

Gets the value of 'clusters' property.

Return values

  clusters | - The current value of the field. Clusters that must contain the hosts for the hosts to match the filter. Optional#

Code:
click to view
# Number of lines of code in get_clusters: 5
sub get_clusters {
my ($self, %args) = @_;
return $self->{'clusters'};
}

public method Com::Vmware::Vcenter::Host::FilterSpec::get_connection_states | ( |  | ) |

Gets the value of 'connection_states' property.

Return values

  connection_states | - The current value of the field. Connection states that a host must be in to match the filter (see :attr:`Com::Vmware::Vcenter::Host::Summary.connection_state` . Optional#

Code:
click to view
# Number of lines of code in get_connection_states: 5
sub get_connection_states {
my ($self, %args) = @_;
return $self->{'connection_states'};
}

public method Com::Vmware::Vcenter::Host::FilterSpec::get_datacenters | ( |  | ) |

Gets the value of 'datacenters' property.

Return values

  datacenters | - The current value of the field. Datacenters that must contain the hosts for the hosts to match the filter. Optional#

Code:
click to view
# Number of lines of code in get_datacenters: 5
sub get_datacenters {
my ($self, %args) = @_;
return $self->{'datacenters'};
}

public method Com::Vmware::Vcenter::Host::FilterSpec::get_folders | ( |  | ) |

Gets the value of 'folders' property.

Return values

  folders | - The current value of the field. Folders that must contain the hosts for the hosts to match the filter. Optional#

Code:
click to view
# Number of lines of code in get_folders: 5
sub get_folders {
my ($self, %args) = @_;
return $self->{'folders'};
}

public method Com::Vmware::Vcenter::Host::FilterSpec::get_hosts | ( |  | ) |

Gets the value of 'hosts' property.

Return values

  hosts | - The current value of the field. Identifiers of hosts that can match the filter. Optional#

Code:
click to view
# Number of lines of code in get_hosts: 5
sub get_hosts {
my ($self, %args) = @_;
return $self->{'hosts'};
}

public method Com::Vmware::Vcenter::Host::FilterSpec::get_names | ( |  | ) |

Gets the value of 'names' property.

Return values

  names | - The current value of the field. Names that hosts must have to match the filter (see :attr:`Com::Vmware::Vcenter::Host::Summary.name` ). Optional#

Code:
click to view
# Number of lines of code in get_names: 5
sub get_names {
my ($self, %args) = @_;
return $self->{'names'};
}

public method Com::Vmware::Vcenter::Host::FilterSpec::get_standalone | ( |  | ) |

Gets the value of 'standalone' property.

Return values

  standalone | - The current value of the field. If true, only hosts that are not part of a cluster can match the filter, and if false, only hosts that are are part of a cluster can match the filter. Optional#

Code:
click to view
# Number of lines of code in get_standalone: 5
sub get_standalone {
my ($self, %args) = @_;
return $self->{'standalone'};
}

public method Com::Vmware::Vcenter::Host::FilterSpec::new | ( |  | ) |

Constructor to initialize the Com::Vmware::Vcenter::Host::FilterSpec structure

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 42
package Com::Vmware::Vcenter::Host::FilterSpec;
#
# Base class
#
use base qw(Com::Vmware::Vapi::Bindings::VapiStruct);
#
# vApi modules
#
use Com::Vmware::Vapi::Data::UnionValidator;
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{hosts} = $args{'hosts'};
$self->{names} = $args{'names'};
$self->{folders} = $args{'folders'};
$self->{datacenters} = $args{'datacenters'};
$self->{standalone} = $args{'standalone'};
$self->{clusters} = $args{'clusters'};
$self->{connection_states} = $args{'connection_states'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Vcenter::Host::FilterSpec');
$self->set_binding_name('name' => 'com.vmware.vcenter.host.filter_spec');
$self->set_binding_field('key' => 'hosts', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::SetType('binding_type' => new Com::Vmware::Vapi::Bindings::Type::ListType(new Com::Vmware::Vapi::Bindings::Type::StringType()))));
$self->set_binding_field('key' => 'names', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::SetType('binding_type' => new Com::Vmware::Vapi::Bindings::Type::ListType(new Com::Vmware::Vapi::Bindings::Type::StringType()))));
$self->set_binding_field('key' => 'folders', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::SetType('binding_type' => new Com::Vmware::Vapi::Bindings::Type::ListType(new Com::Vmware::Vapi::Bindings::Type::StringType()))));
$self->set_binding_field('key' => 'datacenters', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::SetType('binding_type' => new Com::Vmware::Vapi::Bindings::Type::ListType(new Com::Vmware::Vapi::Bindings::Type::StringType()))));
$self->set_binding_field('key' => 'standalone', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::BooleanType()));
$self->set_binding_field('key' => 'clusters', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::SetType('binding_type' => new Com::Vmware::Vapi::Bindings::Type::ListType(new Com::Vmware::Vapi::Bindings::Type::StringType()))));
$self->set_binding_field('key' => 'connection_states', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::SetType('binding_type' => new Com::Vmware::Vapi::Bindings::Type::ListType(new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter', 'type_name' => 'Host::ConnectionState')))));
bless $self, $class;
return $self;
}

public method Com::Vmware::Vcenter::Host::FilterSpec::set_clusters | ( |  | ) |

Sets the given value for 'clusters' property.

Parameters

  clusters | - New value for the field. Clusters that must contain the hosts for the hosts to match the filter.

Code:
click to view
# Number of lines of code in set_clusters: 6
sub set_clusters {
my ($self, %args) = @_;
$self->{'clusters'} = $args{'clusters'};
return;
}

public method Com::Vmware::Vcenter::Host::FilterSpec::set_connection_states | ( |  | ) |

Sets the given value for 'connection_states' property.

Parameters

  connection_states | - New value for the field. Connection states that a host must be in to match the filter (see :attr:`Com::Vmware::Vcenter::Host::Summary.connection_state` .

Code:
click to view
# Number of lines of code in set_connection_states: 10
sub set_connection_states {
my ($self, %args) = @_;
$self->{'connection_states'} = $args{'connection_states'};
return;
}
1;

public method Com::Vmware::Vcenter::Host::FilterSpec::set_datacenters | ( |  | ) |

Sets the given value for 'datacenters' property.

Parameters

  datacenters | - New value for the field. Datacenters that must contain the hosts for the hosts to match the filter.

Code:
click to view
# Number of lines of code in set_datacenters: 6
sub set_datacenters {
my ($self, %args) = @_;
$self->{'datacenters'} = $args{'datacenters'};
return;
}

public method Com::Vmware::Vcenter::Host::FilterSpec::set_folders | ( |  | ) |

Sets the given value for 'folders' property.

Parameters

  folders | - New value for the field. Folders that must contain the hosts for the hosts to match the filter.

Code:
click to view
# Number of lines of code in set_folders: 6
sub set_folders {
my ($self, %args) = @_;
$self->{'folders'} = $args{'folders'};
return;
}

public method Com::Vmware::Vcenter::Host::FilterSpec::set_hosts | ( |  | ) |

Sets the given value for 'hosts' property.

Parameters

  hosts | - New value for the field. Identifiers of hosts that can match the filter.

Code:
click to view
# Number of lines of code in set_hosts: 6
sub set_hosts {
my ($self, %args) = @_;
$self->{'hosts'} = $args{'hosts'};
return;
}

public method Com::Vmware::Vcenter::Host::FilterSpec::set_names | ( |  | ) |

Sets the given value for 'names' property.

Parameters

  names | - New value for the field. Names that hosts must have to match the filter (see :attr:`Com::Vmware::Vcenter::Host::Summary.name` ).

Code:
click to view
# Number of lines of code in set_names: 6
sub set_names {
my ($self, %args) = @_;
$self->{'names'} = $args{'names'};
return;
}

public method Com::Vmware::Vcenter::Host::FilterSpec::set_standalone | ( |  | ) |

Sets the given value for 'standalone' property.

Parameters

  standalone | - New value for the field. If true, only hosts that are not part of a cluster can match the filter, and if false, only hosts that are are part of a cluster can match the filter.

Code:
click to view
# Number of lines of code in set_standalone: 6
sub set_standalone {
my ($self, %args) = @_;
$self->{'standalone'} = $args{'standalone'};
return;
}

The documentation for this class was generated from the following file:

- Com/Vmware/Vcenter/Host.pm