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.



3529
3530
3531
# File 'lib/platform-api/client.rb', line 3529

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



3537
3538
3539
# File 'lib/platform-api/client.rb', line 3537

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



3545
3546
3547
# File 'lib/platform-api/client.rb', line 3545

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



3560
3561
3562
# File 'lib/platform-api/client.rb', line 3560

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



3552
3553
3554
# File 'lib/platform-api/client.rb', line 3552

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



3569
3570
3571
# File 'lib/platform-api/client.rb', line 3569

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