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::Appliance::Vmon::Service Class Reference
Inheritance diagram for Com::Vmware::Appliance::Vmon::Service:
Com::Vmware::Vapi::Bindings::VapiInterface

Classes

class  Health
 
class  Info
 
class  StartupType
 
class  State
 
class  UpdateSpec
 

Avaliable Methods

public method restart ()
 
public method stop ()
 
public method get ()
 
public method list_details ()
 
public method new ()
 
public method update ()
 
public method start ()
 

Detailed Description

The Com::Vmware::Appliance::Vmon::Service interface provides methods to manage a single/set of services that are managed by vMon.

Member Function Documentation

public method Com::Vmware::Appliance::Vmon::Service::get ( )

Returns the state of a service.

Parameters
service[REQUIRED] identifier of the service whose state is being queried. The value must be an identifier for the resource type getQualifiedName(com.vmware.appliance.vmon.Service). . The value must be str.
Return values
ServiceInfo structure. The return type will be Com::Vmware::Appliance::Vmon::Service::Info
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the service associated with service does not exist.
Com::Vmware::Vapi::Std::Errors::Errorif any other error occurs during the execution of the operation.
Code:
click to view
public method Com::Vmware::Appliance::Vmon::Service::list_details ( )

Lists details of services managed by vMon.

Return values
Mapof service identifiers to service Info structures. The value will be an identifier for the resource type getQualifiedName(com.vmware.appliance.vmon.Service). The return type will be Dictionary of str and Com::Vmware::Appliance::Vmon::Service::Info
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif any error occurs during the execution of the operation.
Code:
click to view
public method Com::Vmware::Appliance::Vmon::Service::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
public method Com::Vmware::Appliance::Vmon::Service::restart ( )

Restarts a service

Parameters
service[REQUIRED] identifier of the service to restart The value must be an identifier for the resource type getQualifiedName(com.vmware.appliance.vmon.Service). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the service associated with service does not exist.
Com::Vmware::Vapi::Std::Errors::TimedOutif any timeout occurs during the execution of the restart operation.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif the operation is denied in the current state of the service. If a stop or start operation is in progress, issuing a restart operation will lead to this error.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif a restart operation is issued on a service which has startup type :attr:Com::Vmware::Appliance::Vmon::Service::StartupType.DISABLED
Com::Vmware::Vapi::Std::Errors::Errorif any other error occurs during the execution of the operation.
Code:
click to view
public method Com::Vmware::Appliance::Vmon::Service::start ( )

Starts a service

Parameters
service[REQUIRED] identifier of the service to start The value must be an identifier for the resource type getQualifiedName(com.vmware.appliance.vmon.Service). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the service associated with service does not exist.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif the operation is denied in the current state of the service. If a stop or restart operation is in progress, the start operation will not be allowed.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif start operation is issued on a service which has startup type :attr:Com::Vmware::Appliance::Vmon::Service::StartupType.DISABLED .
Com::Vmware::Vapi::Std::Errors::TimedOutif any timeout occurs during the execution of the start operation. Timeout occurs when the service takes longer than StartTimeout to start.
Com::Vmware::Vapi::Std::Errors::Errorif any other error occurs during the execution of the operation.
Code:
click to view
public method Com::Vmware::Appliance::Vmon::Service::stop ( )

Stops a service

Parameters
service[REQUIRED] identifier of the service to stop The value must be an identifier for the resource type getQualifiedName(com.vmware.appliance.vmon.Service). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the service associated with service does not exist.
Com::Vmware::Vapi::Std::Errors::Errorif any other error occurs during the execution of the operation.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif the operation is denied in the current state of the service. If a stop operation is in progress, issuing another stop operation will lead to this error.
Code:
click to view
public method Com::Vmware::Appliance::Vmon::Service::update ( )

Updates the properties of a service.

Parameters
service[REQUIRED] identifier of the service whose properties are being updated. The value must be an identifier for the resource type getQualifiedName(com.vmware.appliance.vmon.Service). . The value must be str.
spec[REQUIRED] Service Update specification. . The value must be Com::Vmware::Appliance::Vmon::Service::UpdateSpec.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the service associated with service does not exist.
Com::Vmware::Vapi::Std::Errors::Errorif any other error occurs during the execution of the operation.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif the operation is denied in the current state of the service. If a start, stop or restart operation is in progress, update operation will fail with this error.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif a request to set the :attr:Com::Vmware::Appliance::Vmon::Service::UpdateSpec.startup_type field of spec to :attr:Com::Vmware::Appliance::Vmon::Service::StartupType.DISABLED comes in for a service that is not in :attr:Com::Vmware::Appliance::Vmon::Service::State.STOPPED state.
Code:
click to view

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