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.



3563
3564
3565
# File 'lib/platform-api/client.rb', line 3563

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



3571
3572
3573
# File 'lib/platform-api/client.rb', line 3571

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



3579
3580
3581
# File 'lib/platform-api/client.rb', line 3579

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



3594
3595
3596
# File 'lib/platform-api/client.rb', line 3594

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



3586
3587
3588
# File 'lib/platform-api/client.rb', line 3586

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



3603
3604
3605
# File 'lib/platform-api/client.rb', line 3603

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