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.



858
859
860
# File 'lib/platform-api/client.rb', line 858

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



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

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



865
866
867
# File 'lib/platform-api/client.rb', line 865

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