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::Hardware::Memory::UpdateSpec Class Reference
Inheritance diagram for Com::Vmware::Vcenter::Vm::Hardware::Memory::UpdateSpec:

## Avaliable Methods
public method | set_size_MiB ()
public method | get_size_MiB ()
public method | set_hot_add_enabled ()
public method | new ()
public method | get_hot_add_enabled ()

## Detailed Description

The `Com::Vmware::Vcenter::Vm::Hardware::Memory::UpdateSpec` class describes the updates to be made to the memory-related settings of a virtual machine.

## Member Function Documentation

public method Com::Vmware::Vcenter::Vm::Hardware::Memory::UpdateSpec::get_hot_add_enabled | ( |  | ) |

Gets the value of 'hot_add_enabled' property.

Return values

  hot_add_enabled | - The current value of the field. Flag indicating whether adding memory while the virtual machine is running should be enabled.

Some guest operating systems may consume more resources or perform less efficiently when they run on hardware that supports adding memory while the machine is running.

This field may only be modified if the virtual machine is not powered on.

Optional#

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

public method Com::Vmware::Vcenter::Vm::Hardware::Memory::UpdateSpec::get_size_MiB | ( |  | ) |

Gets the value of 'size_MiB' property.

Return values

  size_MiB | - The current value of the field. New memory size in mebibytes.

The supported range of memory sizes is constrained by the configured guest operating system and virtual hardware version of the virtual machine.

If the virtual machine is running, this value may only be changed if :attr:`Com::Vmware::Vcenter::Vm::Hardware::Memory::Info.hot_add_enabled` is true, and the new memory size must satisfy the constraints specified by :attr:`Com::Vmware::Vcenter::Vm::Hardware::Memory::Info.hot_add_increment_size_mib` and :attr:`Com::Vmware::Vcenter::Vm::Hardware::Memory::Info.hot_add_limit_mib` .

Optional#

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

public method Com::Vmware::Vcenter::Vm::Hardware::Memory::UpdateSpec::new | ( |  | ) |

Constructor to initialize the Com::Vmware::Vcenter::Vm::Hardware::Memory::UpdateSpec structure

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 18
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{size_MiB} = $args{'size_MiB'};
$self->{hot_add_enabled} = $args{'hot_add_enabled'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Vcenter::Vm::Hardware::Memory::UpdateSpec');
$self->set_binding_name('name' => 'com.vmware.vcenter.vm.hardware.memory.update_spec');
$self->set_binding_field('key' => 'size_MiB', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::LongType()));
$self->set_binding_field('key' => 'hot_add_enabled', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::BooleanType()));
bless $self, $class;
return $self;
}

public method Com::Vmware::Vcenter::Vm::Hardware::Memory::UpdateSpec::set_hot_add_enabled | ( |  | ) |

Sets the given value for 'hot_add_enabled' property.

Parameters

  hot_add_enabled | - New value for the field. Flag indicating whether adding memory while the virtual machine is running should be enabled.

Some guest operating systems may consume more resources or perform less efficiently when they run on hardware that supports adding memory while the machine is running.

This field may only be modified if the virtual machine is not powered on.

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

public method Com::Vmware::Vcenter::Vm::Hardware::Memory::UpdateSpec::set_size_MiB | ( |  | ) |

Sets the given value for 'size_MiB' property.

Parameters

  size_MiB | - New value for the field. New memory size in mebibytes.

The supported range of memory sizes is constrained by the configured guest operating system and virtual hardware version of the virtual machine.

If the virtual machine is running, this value may only be changed if :attr:`Com::Vmware::Vcenter::Vm::Hardware::Memory::Info.hot_add_enabled` is true, and the new memory size must satisfy the constraints specified by :attr:`Com::Vmware::Vcenter::Vm::Hardware::Memory::Info.hot_add_increment_size_mib` and :attr:`Com::Vmware::Vcenter::Vm::Hardware::Memory::Info.hot_add_limit_mib` .

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

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

- Com/Vmware/Vcenter/Vm/Hardware/Memory.pm