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::Vapi::Std::Errors::UnableToAllocateResource Class Reference
Inheritance diagram for Com::Vmware::Vapi::Std::Errors::UnableToAllocateResource:

## Avaliable Methods
public method | new ()

## Detailed Description

The `Com::Vmware::Vapi::Std::Errors::UnableToAllocateResource` error indicates that the method failed because it was unable to allocate or acquire a required resource.

Examples:

- Trying to power on a virtual machine when there are not enough licenses to do so.
- Trying to power on a virtual machine that would violate a resource usage policy.

Counterexamples:

- Trying to power off a virtual machine that is in the process of being powered on. A class Com::Vmware::Vapi::Std::Errors::ResourceBusy error would be used instead.
- Trying to remove a VMFS datastore when the is a virtual machine registered on any host attached to the datastore. The class Com::Vmware::Vapi::Std::Errors::ResourceInUse error would be used instead.
- Trying to add a virtual switch if the physical network adapter being bridged is already in use. The class Com::Vmware::Vapi::Std::Errors::ResourceInUse error would be used instead.
- Attempt to invoke some method on a virtual machine when the virtual machine's configuration file is not accessible (for example due to a storage APD condition). The class Com::Vmware::Vapi::Std::Errors::ResourceInaccessible error would be used instead.

## Member Function Documentation

public method Com::Vmware::Vapi::Std::Errors::UnableToAllocateResource::new | ( |  | ) |

Constructor to initialize the Com::Vmware::Vapi::Std::Errors::UnableToAllocateResource structure

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 14
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->set_binding_class('binding_class' => 'Com::Vmware::Vapi::Std::Errors::UnableToAllocateResource');
$self->set_binding_name('name' => 'com.vmware.vapi.std.errors.unable_to_allocate_resource');
bless $self, $class;
return $self;
}

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

- Com/Vmware/Vapi/Std/Errors/UnableToAllocateResource.pm