Class: PlatformAPI::OciImage

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

Overview

An OCI (Open Container Initiative) image is a standardized format for packaging and distributing containerized applications, ready to run on the platform.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OciImage

Returns a new instance of OciImage.



2345
2346
2347
# File 'lib/platform-api/client.rb', line 2345

def initialize(client)
  @client = client
end

Instance Method Details

#create(app_id_or_app_name, body = {}) ⇒ Object

Create an new OCI image of an app

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



2361
2362
2363
# File 'lib/platform-api/client.rb', line 2361

def create(app_id_or_app_name, body = {})
  @client.oci_image.create(app_id_or_app_name, body)
end

#info(app_id_or_app_name, oci_image_id_or_oci_image_digest) ⇒ Object

Info for the OCI images of an app, filtered by identifier.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • oci_image_id_or_oci_image_digest:

    unique identifier of the OCI image or unique identifier representing the content of the OCI image



2353
2354
2355
# File 'lib/platform-api/client.rb', line 2353

def info(app_id_or_app_name, oci_image_id_or_oci_image_digest)
  @client.oci_image.info(app_id_or_app_name, oci_image_id_or_oci_image_digest)
end