Class: PlatformAPI::InboundRuleset

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

Overview

An inbound-ruleset is a collection of rules that specify what hosts can or cannot connect to an application.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ InboundRuleset

Returns a new instance of InboundRuleset.



1993
1994
1995
# File 'lib/platform-api/client.rb', line 1993

def initialize(client)
  @client = client
end

Instance Method Details

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

Create a new inbound ruleset

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space

  • body:

    the object to pass as the request payload



2023
2024
2025
# File 'lib/platform-api/client.rb', line 2023

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

#current(space_id_or_space_name) ⇒ Object

Current inbound ruleset for a space

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space



2000
2001
2002
# File 'lib/platform-api/client.rb', line 2000

def current(space_id_or_space_name)
  @client.inbound_ruleset.current(space_id_or_space_name)
end

#info(space_id_or_space_name, inbound_ruleset_id) ⇒ Object

Info on an existing Inbound Ruleset

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space

  • inbound_ruleset_id:

    unique identifier of an inbound-ruleset



2008
2009
2010
# File 'lib/platform-api/client.rb', line 2008

def info(space_id_or_space_name, inbound_ruleset_id)
  @client.inbound_ruleset.info(space_id_or_space_name, inbound_ruleset_id)
end

#list(space_id_or_space_name) ⇒ Object

List all inbound rulesets for a space

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space



2015
2016
2017
# File 'lib/platform-api/client.rb', line 2015

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