Class: PlatformAPI::AddonAction

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

Add-on Actions are lifecycle operations for add-on provisioning and deprovisioning. They allow add-on providers to (de)provision add-ons in the background and then report back when (de)provisioning is complete.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ AddonAction

Returns a new instance of AddonAction.



877
878
879
# File 'lib/platform-api/client.rb', line 877

def initialize(client)
  @client = client
end

Instance Method Details

#deprovision(addon_id_or_addon_name) ⇒ Object

Mark an add-on as deprovisioned.

Parameters:

  • addon_id_or_addon_name:

    unique identifier of add-on or globally unique name of the add-on



891
892
893
# File 'lib/platform-api/client.rb', line 891

def deprovision(addon_id_or_addon_name)
  @client.addon_action.deprovision(addon_id_or_addon_name)
end

#provision(addon_id_or_addon_name) ⇒ Object

Mark an add-on as provisioned for use.

Parameters:

  • addon_id_or_addon_name:

    unique identifier of add-on or globally unique name of the add-on



884
885
886
# File 'lib/platform-api/client.rb', line 884

def provision(addon_id_or_addon_name)
  @client.addon_action.provision(addon_id_or_addon_name)
end