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

## Avaliable Methods
public method | new ()

## Detailed Description

The `Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState` error indicates that the requested method is not allowed with a resource or service in its current state. This could be because the method is performing a configuration change that is not allowed in the current state or because method itself is not allowed in the current state.

Examples:

- Trying to add a virtual device that cannot be hot plugged to a running virtual machine.
- Trying to upgrade the virtual hardware version for a suspended virtual machine.
- Trying to power off, reset, or suspend a virtual machine that is not powered on.

Counterexamples:

- Trying to power off a virtual machine that is in the process of being powered on. The class Com::Vmware::Vapi::Std::Errors::ResourceBusy error would be used instead.

## Member Function Documentation

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

Constructor to initialize the Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState 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::NotAllowedInCurrentState');
$self->set_binding_name('name' => 'com.vmware.vapi.std.errors.not_allowed_in_current_state');
bless $self, $class;
return $self;
}

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

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