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.



872
873
874
# File 'lib/platform-api/client.rb', line 872

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



886
887
888
# File 'lib/platform-api/client.rb', line 886

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



879
880
881
# File 'lib/platform-api/client.rb', line 879

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