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::VM::FilterSpec Class Reference
Inheritance diagram for Com::Vmware::Vcenter::VM::FilterSpec:

## Avaliable Methods
public method | set_resource_pools ()
public method | get_hosts ()
public method | set_datacenters ()
public method | set_power_states ()
public method | set_folders ()
public method | get_clusters ()
public method | new ()
public method | get_vms ()
public method | set_hosts ()
public method | get_folders ()
public method | get_names ()
public method | get_resource_pools ()
public method | get_datacenters ()
public method | set_clusters ()
public method | set_names ()
public method | get_power_states ()
public method | set_vms ()

## Detailed Description

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

## Member Function Documentation

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

Gets the value of 'clusters' property.

Return values

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

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

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

Gets the value of 'datacenters' property.

Return values

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

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

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

Gets the value of 'folders' property.

Return values

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

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

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

Gets the value of 'hosts' property.

Return values

  hosts | - The current value of the field. Hosts that must contain the virtual machine for the virtual machine to match the filter. Optional#

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

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

Gets the value of 'names' property.

Return values

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

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

public method Com::Vmware::Vcenter::VM::FilterSpec::get_power_states | ( |  | ) |

Gets the value of 'power_states' property.

Return values

  power_states | - The current value of the field. Power states that a virtual machine must be in to match the filter (see :attr:`Com::Vmware::Vcenter::Vm::Power::Info.state` . Optional#

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

public method Com::Vmware::Vcenter::VM::FilterSpec::get_resource_pools | ( |  | ) |

Gets the value of 'resource_pools' property.

Return values

  resource_pools | - The current value of the field. Resource pools that must contain the virtual machine for the virtual machine to match the filter. Optional#

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

public method Com::Vmware::Vcenter::VM::FilterSpec::get_vms | ( |  | ) |

Gets the value of 'vms' property.

Return values

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

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

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

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

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 30
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{vms} = $args{'vms'};
$self->{names} = $args{'names'};
$self->{folders} = $args{'folders'};
$self->{datacenters} = $args{'datacenters'};
$self->{hosts} = $args{'hosts'};
$self->{clusters} = $args{'clusters'};
$self->{resource_pools} = $args{'resource_pools'};
$self->{power_states} = $args{'power_states'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Vcenter::VM::FilterSpec');
$self->set_binding_name('name' => 'com.vmware.vcenter.VM.filter_spec');
$self->set_binding_field('key' => 'vms', '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' => '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' => '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' => 'resource_pools', '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' => 'power_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::Vm', 'type_name' => 'Power::State')))));
bless $self, $class;
return $self;
}

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

Sets the given value for 'clusters' property.

Parameters

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

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

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

Sets the given value for 'datacenters' property.

Parameters

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

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

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

Sets the given value for 'folders' property.

Parameters

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

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

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

Sets the given value for 'hosts' property.

Parameters

  hosts | - New value for the field. Hosts that must contain the virtual machine for the virtual machine to match the filter.

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

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

Sets the given value for 'names' property.

Parameters

  names | - New value for the field. Names that virtual machines must have to match the filter (see :attr:`Com::Vmware::Vcenter::VM::Info.name` ).

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

public method Com::Vmware::Vcenter::VM::FilterSpec::set_power_states | ( |  | ) |

Sets the given value for 'power_states' property.

Parameters

  power_states | - New value for the field. Power states that a virtual machine must be in to match the filter (see :attr:`Com::Vmware::Vcenter::Vm::Power::Info.state` .

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

public method Com::Vmware::Vcenter::VM::FilterSpec::set_resource_pools | ( |  | ) |

Sets the given value for 'resource_pools' property.

Parameters

  resource_pools | - New value for the field. Resource pools that must contain the virtual machine for the virtual machine to match the filter.

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

public method Com::Vmware::Vcenter::VM::FilterSpec::set_vms | ( |  | ) |

Sets the given value for 'vms' property.

Parameters

  vms | - New value for the field. Identifiers of virtual machines that can match the filter.

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

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

- Com/Vmware/Vcenter/VM.pm