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

## Avaliable Methods
public method | set_resource_pool ()
public method | get_folder ()
public method | set_folder ()
public method | get_datastore ()
public method | set_cluster ()
public method | set_datastore ()
public method | get_resource_pool ()
public method | new ()
public method | set_host ()
public method | get_cluster ()
public method | get_host ()

## Detailed Description

The `Com::Vmware::Vcenter::VM::PlacementSpec` class contains information used to place a virtual machine onto resources within the vCenter inventory.

## Member Function Documentation

public method Com::Vmware::Vcenter::VM::PlacementSpec::get_cluster | ( |  | ) |

Gets the value of 'cluster' property.

Return values

  cluster | - The current value of the field. Cluster onto which the virtual machine should be placed.

If `cluster` and `resourcePool` are both specified, `resourcePool` must belong to `cluster` .

If `cluster` and `host` are both specified, `host` must be a member of `cluster` .

Optional#

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

public method Com::Vmware::Vcenter::VM::PlacementSpec::get_datastore | ( |  | ) |

Gets the value of 'datastore' property.

Return values

  datastore | - The current value of the field. Datastore on which the virtual machine's configuration state should be stored. This datastore will also be used for any virtual disks that are created as part of the virtual machine creation operation. Optional#

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

public method Com::Vmware::Vcenter::VM::PlacementSpec::get_folder | ( |  | ) |

Gets the value of 'folder' property.

Return values

  folder | - The current value of the field. Virtual machine folder into which the virtual machine should be placed. Optional#

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

public method Com::Vmware::Vcenter::VM::PlacementSpec::get_host | ( |  | ) |

Gets the value of 'host' property.

Return values

  host | - The current value of the field. Host onto which the virtual machine should be placed.

If `host` and `resourcePool` are both specified, `resourcePool` must belong to `host` .

If `host` and `cluster` are both specified, `host` must be a member of `cluster` .

Optional#

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

public method Com::Vmware::Vcenter::VM::PlacementSpec::get_resource_pool | ( |  | ) |

Gets the value of 'resource_pool' property.

Return values

  resource_pool | - The current value of the field. Resource pool into which the virtual machine should be placed. Optional#

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

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

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

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 24
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{folder} = $args{'folder'};
$self->{resource_pool} = $args{'resource_pool'};
$self->{host} = $args{'host'};
$self->{cluster} = $args{'cluster'};
$self->{datastore} = $args{'datastore'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Vcenter::VM::PlacementSpec');
$self->set_binding_name('name' => 'com.vmware.vcenter.VM.placement_spec');
$self->set_binding_field('key' => 'folder', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'resource_pool', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'host', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'cluster', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'datastore', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
bless $self, $class;
return $self;
}

public method Com::Vmware::Vcenter::VM::PlacementSpec::set_cluster | ( |  | ) |

Sets the given value for 'cluster' property.

Parameters

  cluster | - New value for the field. Cluster onto which the virtual machine should be placed.

If `cluster` and `resourcePool` are both specified, `resourcePool` must belong to `cluster` .

If `cluster` and `host` are both specified, `host` must be a member of `cluster` .

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

public method Com::Vmware::Vcenter::VM::PlacementSpec::set_datastore | ( |  | ) |

Sets the given value for 'datastore' property.

Parameters

  datastore | - New value for the field. Datastore on which the virtual machine's configuration state should be stored. This datastore will also be used for any virtual disks that are created as part of the virtual machine creation operation.

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

public method Com::Vmware::Vcenter::VM::PlacementSpec::set_folder | ( |  | ) |

Sets the given value for 'folder' property.

Parameters

  folder | - New value for the field. Virtual machine folder into which the virtual machine should be placed.

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

public method Com::Vmware::Vcenter::VM::PlacementSpec::set_host | ( |  | ) |

Sets the given value for 'host' property.

Parameters

  host | - New value for the field. Host onto which the virtual machine should be placed.

If `host` and `resourcePool` are both specified, `resourcePool` must belong to `host` .

If `host` and `cluster` are both specified, `host` must be a member of `cluster` .

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

public method Com::Vmware::Vcenter::VM::PlacementSpec::set_resource_pool | ( |  | ) |

Sets the given value for 'resource_pool' property.

Parameters

  resource_pool | - New value for the field. Resource pool into which the virtual machine should be placed.

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

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

- Com/Vmware/Vcenter/VM.pm