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

## Avaliable Methods
public method | new ()

## Detailed Description

The `Com::Vmware::Vapi::Std::Errors::InvalidArgument` error indicates that the values received for one or more parameters are not acceptable.

This error is reported by the API infrastructure, so it could occur in response to the invocation of any method . It may also be reported as the result of method -specific validation.

Examples:

- A parameter has a value that is not of the expected type.
- A parameter has a value that is not in the required range.
- A parameter has a value that is not one of the specifically allowed strings.
- One field of a class is the tag for a tagged union, and has a specific value but another field of the class that is required to be specified when the tag has that value is not specified, or another field of the class that is required to be unspecified when the tag has that value is specified.

Counterexamples:

- Trying to create a new tag in tag category when a tag with the specified name already exists the tag category. The class Com::Vmware::Vapi::Std::Errors::AlreadyExists error would be used instead.
- Invoke the method to retrieve information about a virtual machine, passing an id that does not identify an existing virtual machine. The class Com::Vmware::Vapi::Std::Errors::NotFound error would be used instead.
- Attempt to put a virtual machine into a folder that can only contain hosts. The class Com::Vmware::Vapi::Std::Errors::InvalidElementType error would be used instead.
- Attempt to attach a SCSI virtual disk to an IDE port. The class Com::Vmware::Vapi::Std::Errors::InvalidElementType error would be used instead.

## Member Function Documentation

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

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

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

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