Class List Method List File List

# Class: Com::Vmware::Vapi::Vcenter::Activation

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Vapi::Vcenter::Activation
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/vcenter.rb

## Overview

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

## Instance Method Summary (collapse)

- - (Void) cancel(activation_id)

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

- - (Activation) initialize(config) constructor

  Constructs a new instance.

## Constructor Details

### - (`Activation`) initialize(config)

Constructs a new instance.

Parameters:

- config (`VAPI::Bindings::StubConfig`) —

  A hash with the api provider details.

    55
    56
    57
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/vcenter.rb', line 55

    def initialize(config)
        super(config, @@service_info)
    end

## Instance Method Details

### - (`Void`) cancel(activation_id)

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

Parameters:

- activation_id (`String`) —

  the ``activation_id`` associated with a vCenter Server task to be canceled.

Returns:

- (`Void`)

Raises:

- (`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.

    75
    76
    77
    78
    79
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/vcenter.rb', line 75

    def cancel(activation_id)
        invoke_with_info(@@cancel_info, {
            'activation_id' => activation_id,
        })
    end