Class: PlatformAPI::SniEndpoint

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

Overview

SNI Endpoint is a public address serving a custom SSL cert for HTTPS traffic, using the SNI TLS extension, to a Heroku app.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ SniEndpoint

Returns a new instance of SniEndpoint.



2838
2839
2840
# File 'lib/platform-api/client.rb', line 2838

def initialize(client)
  @client = client
end

Instance Method Details

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

Create a new SNI endpoint.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



2846
2847
2848
# File 'lib/platform-api/client.rb', line 2846

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

#delete(app_id_or_app_name, sni_endpoint_id_or_sni_endpoint_name) ⇒ Object

Delete existing SNI endpoint.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • sni_endpoint_id_or_sni_endpoint_name:

    unique identifier of this SNI endpoint or unique name for SNI endpoint



2854
2855
2856
# File 'lib/platform-api/client.rb', line 2854

def delete(app_id_or_app_name, sni_endpoint_id_or_sni_endpoint_name)
  @client.sni_endpoint.delete(app_id_or_app_name, sni_endpoint_id_or_sni_endpoint_name)
end

#info(app_id_or_app_name, sni_endpoint_id_or_sni_endpoint_name) ⇒ Object

Info for existing SNI endpoint.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • sni_endpoint_id_or_sni_endpoint_name:

    unique identifier of this SNI endpoint or unique name for SNI endpoint



2862
2863
2864
# File 'lib/platform-api/client.rb', line 2862

def info(app_id_or_app_name, sni_endpoint_id_or_sni_endpoint_name)
  @client.sni_endpoint.info(app_id_or_app_name, sni_endpoint_id_or_sni_endpoint_name)
end

#list(app_id_or_app_name) ⇒ Object

List existing SNI endpoints.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



2869
2870
2871
# File 'lib/platform-api/client.rb', line 2869

def list(app_id_or_app_name)
  @client.sni_endpoint.list(app_id_or_app_name)
end

#update(app_id_or_app_name, sni_endpoint_id_or_sni_endpoint_name, body = {}) ⇒ Object

Update an existing SNI endpoint.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • sni_endpoint_id_or_sni_endpoint_name:

    unique identifier of this SNI endpoint or unique name for SNI endpoint

  • body:

    the object to pass as the request payload



2878
2879
2880
# File 'lib/platform-api/client.rb', line 2878

def update(app_id_or_app_name, sni_endpoint_id_or_sni_endpoint_name, body = {})
  @client.sni_endpoint.update(app_id_or_app_name, sni_endpoint_id_or_sni_endpoint_name, body)
end