=begin
@author Ryan Tiffany
=end
require 'softlayer_api'
require 'pp'
client = SoftLayer::Client.new(:timeout => 120)
secGroupId = 84301
# Create an object template to create the item.
objectTemplate = {
'direction' => 'ingress',
'protocol' => 'tcp',
'portRangeMin' => 22,
'portRangeMax' => 22,
'ethertype' => 'IPv4',
'remoteIp' => '0.0.0.0/0'
}
newRules = client['SoftLayer_Network_SecurityGroup'].object_with_id(secGroupId).addRules([objectTemplate])
pp newRules
=begin
@author Ryan Tiffany
=end
require 'softlayer_api'
require 'pp'
client = SoftLayer::Client.new(:timeout => 120)
secGroupId = 45101
# Create an object template to create the item.
objectTemplate = [ 48501, 48401 ]
remove = client['SoftLayer_Network_SecurityGroup'].object_with_id(secGroupId).removeRules(objectTemplate)
pp remove
If this article contains any error, or leaves any of your questions unanswered, please help us out by
opening up a github issue.
Open an issue