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::Vcenter::Activation Class Reference
Inheritance diagram for Com::Vmware::Vapi::Vcenter::Activation:

## Avaliable Methods
public method | cancel ()
public method | new ()

## Detailed Description

The `Com::Vmware::Vapi::Vcenter::Activation` interface provides methods for tasks cancelation.

## Member Function Documentation

public method Com::Vmware::Vapi::Vcenter::Activation::cancel | ( |  | ) |

Sends a request to cancel the task associated with the provided `activation_id` .

Parameters

  activation_id | [REQUIRED] the `activation_id` associated with a vCenter Server task to be canceled. The value must be an identifier for the resource type getQualifiedName(com.vmware.Activation). . The value must be str.

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if a vCenter Server task with the given `activation_id` was not found.
  Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState | if the vCenter Server task associated with the given `activation_id` is not cancelable.
  Com::Vmware::Vapi::Std::Errors::Unauthorized | if the user is not authorized to cancel the task.
  Com::Vmware::Vapi::Std::Errors::Unauthenticated | if the user is not authenticated.
  Com::Vmware::Vapi::Std::Errors::ServiceUnavailable | if the task cancelation cannot be performed due to vCenter server is unreachable or it is not properly configured.

Code:
click to view
# Number of lines of code in cancel: 10
sub cancel {
my ($self, %args) = @_;
my $activation_id = $args {activation_id};
$self->validate_args (method_name => 'cancel',
method_args => \%args);
return $self->invoke (method_name => 'cancel',
method_args => \%args);
}

public method Com::Vmware::Vapi::Vcenter::Activation::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

  Blessed | object

Code:
click to view
# Number of lines of code in new: 11
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $stub_config = $args {stub_config};
my $api_provider = $args {api_provider};
my $self = $class->SUPER::new('stub_config' => $stub_config,
'api_provider' => $api_provider);
bless $self, $class;
return $self;
}

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

- Com/Vmware/Vapi/Vcenter/Activation.pm