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
 All Classes Files Functions
Classes | List of all members
Com::Vmware::Vcenter::Datacenter Class Reference
Inheritance diagram for Com::Vmware::Vcenter::Datacenter:
Com::Vmware::Vapi::Bindings::VapiInterface

Classes

class  CreateSpec
 
class  FilterSpec
 
class  Info
 
class  Summary
 

Avaliable Methods

public method create ()
 
public method get ()
 
public method delete ()
 
public method new ()
 
public method list ()
 

Detailed Description

The Com::Vmware::Vcenter::Datacenter interface provides methods to manage datacenters in the vCenter Server. Constant String::RESOURCE_TYPE # The resource type for the vCenter Datacenter

Member Function Documentation

public method Com::Vmware::Vcenter::Datacenter::create ( )

Create a new datacenter in the vCenter inventory

Parameters
spec[REQUIRED] Specification for the new datacenter to be created. . The value must be Com::Vmware::Vcenter::Datacenter::CreateSpec.
Return values
Theidentifier of the newly created datacenter The value will be an identifier for the resource type getQualifiedName(Datacenter). The return type will be str
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::AlreadyExistsif the datacenter with the same name is already present.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif the datacenter name is empty or invalid as per the underlying implementation.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif the folder is not specified and the system cannot choose a suitable one.
Com::Vmware::Vapi::Std::Errors::NotFoundif the datacenter folder cannot be found.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::Datacenter::delete ( )

Delete an empty datacenter from the vCenter Server

Parameters
datacenter[REQUIRED] Identifier of the datacenter to be deleted. The value must be an identifier for the resource type getQualifiedName(Datacenter). . The value must be str.
force[OPTIONAL] If true, delete the datacenter even if it is not empty. If null a class Com::Vmware::Vapi::Std::Errors::ResourceInUse error will be reported if the datacenter is not empty. This is the equivalent of passing the value false. . The value must be Boolean or None.
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::NotFoundif there is no datacenter associated with datacenter in the system.
Com::Vmware::Vapi::Std::Errors::ResourceInUseif the datacenter associated with datacenter is not empty.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::Datacenter::get ( )

Retrieves information about the datacenter corresponding to datacenter .

Parameters
datacenter[REQUIRED] Identifier of the datacenter. The value must be an identifier for the resource type getQualifiedName(Datacenter). . The value must be str.
Return values
Theclass Com::Vmware::Vcenter::Datacenter::Info instances that corresponds to the datacenter . The return type will be Com::Vmware::Vcenter::Datacenter::Info
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::NotFoundif there is no datacenter associated with datacenter in the system.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::Datacenter::list ( )

Returns information about at most 1000 visible (subject to permission checks) datacenters in vCenter matching the class Com::Vmware::Vcenter::Datacenter::FilterSpec .

Parameters
filter[OPTIONAL] Specification of matching datacenters for which information should be returned. If null , the behavior is equivalent to a class Com::Vmware::Vcenter::Datacenter::FilterSpec with all fields null which means all datacenters match the filter. . The value must be Com::Vmware::Vcenter::Datacenter::FilterSpec or None.
Return values
Commonlyused information about the datacenters matching the class Com::Vmware::Vcenter::Datacenter::FilterSpec . The return type will be Array of Com::Vmware::Vcenter::Datacenter::Summary
Exceptions
Com::Vmware::Vapi::Std::Errors::UnableToAllocateResourceif more than 1000 datacenters match the class Com::Vmware::Vcenter::Datacenter::FilterSpec .
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::Datacenter::new ( )

Constructor to initialize the object

Parameters
api_provider- protocol connection to use with stubs created by this factory
StubConfig- Stub's additional configuration
Return values
Blessedobject
Code:
click to view

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