Class: PlatformAPI::OutboundRuleset

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

Overview

An outbound-ruleset is a collection of rules that specify what hosts Dynos are allowed to communicate with.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OutboundRuleset

Returns a new instance of OutboundRuleset.



2272
2273
2274
# File 'lib/platform-api/client.rb', line 2272

def initialize(client)
  @client = client
end

Instance Method Details

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

Create a new outbound 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



2302
2303
2304
# File 'lib/platform-api/client.rb', line 2302

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

#current(space_id_or_space_name) ⇒ Object

Current outbound ruleset for a space

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space



2279
2280
2281
# File 'lib/platform-api/client.rb', line 2279

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

#info(space_id_or_space_name, outbound_ruleset_id) ⇒ Object

Info on an existing Outbound Ruleset

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space

  • outbound_ruleset_id:

    unique identifier of an outbound-ruleset



2287
2288
2289
# File 'lib/platform-api/client.rb', line 2287

def info(space_id_or_space_name, outbound_ruleset_id)
  @client.outbound_ruleset.info(space_id_or_space_name, outbound_ruleset_id)
end

#list(space_id_or_space_name) ⇒ Object

List all Outbound Rulesets for a space

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space



2294
2295
2296
# File 'lib/platform-api/client.rb', line 2294

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