Class: PlatformAPI::VpnConnection

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

Overview

VPN provides a way to connect your Private Spaces to your network via VPN.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ VpnConnection

Returns a new instance of VpnConnection.



3590
3591
3592
# File 'lib/platform-api/client.rb', line 3590

def initialize(client)
  @client = client
end

Instance Method Details

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

Create a new VPN connection in a private space.

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space

  • body:

    the object to pass as the request payload



3598
3599
3600
# File 'lib/platform-api/client.rb', line 3598

def create(space_id_or_space_name, body = {})
  @client.vpn_connection.create(space_id_or_space_name, body)
end

#destroy(space_id_or_space_name, vpn_connection_id_or_vpn_connection_name) ⇒ Object

Destroy existing VPN Connection

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space

  • vpn_connection_id_or_vpn_connection_name:

    VPN ID or VPN Name



3606
3607
3608
# File 'lib/platform-api/client.rb', line 3606

def destroy(space_id_or_space_name, vpn_connection_id_or_vpn_connection_name)
  @client.vpn_connection.destroy(space_id_or_space_name, vpn_connection_id_or_vpn_connection_name)
end

#info(space_id_or_space_name, vpn_connection_id_or_vpn_connection_name) ⇒ Object

Info for an existing vpn-connection.

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space

  • vpn_connection_id_or_vpn_connection_name:

    VPN ID or VPN Name



3621
3622
3623
# File 'lib/platform-api/client.rb', line 3621

def info(space_id_or_space_name, vpn_connection_id_or_vpn_connection_name)
  @client.vpn_connection.info(space_id_or_space_name, vpn_connection_id_or_vpn_connection_name)
end

#list(space_id_or_space_name) ⇒ Object

List VPN connections for a space.

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space



3613
3614
3615
# File 'lib/platform-api/client.rb', line 3613

def list(space_id_or_space_name)
  @client.vpn_connection.list(space_id_or_space_name)
end

#update(space_id_or_space_name, vpn_connection_id_or_vpn_connection_name, body = {}) ⇒ Object

Update a VPN connection in a private space.

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space

  • vpn_connection_id_or_vpn_connection_name:

    VPN ID or VPN Name

  • body:

    the object to pass as the request payload



3630
3631
3632
# File 'lib/platform-api/client.rb', line 3630

def update(space_id_or_space_name, vpn_connection_id_or_vpn_connection_name, body = {})
  @client.vpn_connection.update(space_id_or_space_name, vpn_connection_id_or_vpn_connection_name, body)
end