class ZAWS::External::AWSCLI::Commands::EC2::CreateSecurityGroup

Public Class Methods

new(shellout=nil, awscli=nil) click to toggle source
# File lib/zaws/external/awscli/commands/ec2/create_security_group.rb, line 11
def initialize(shellout=nil, awscli=nil)
  @shellout=shellout
  @awscli=awscli
  clear_settings
end

Public Instance Methods

aws() click to toggle source
# File lib/zaws/external/awscli/commands/ec2/create_security_group.rb, line 17
def aws
  @aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self)
  @aws
end
clear_settings() click to toggle source
# File lib/zaws/external/awscli/commands/ec2/create_security_group.rb, line 22
def clear_settings
  @aws=nil
  @vpc_id=nil
  @group_name=nil
  @description=nil
end
description(description) click to toggle source
# File lib/zaws/external/awscli/commands/ec2/create_security_group.rb, line 39
def description(description)
  @description=description
  self
end
get_command() click to toggle source
# File lib/zaws/external/awscli/commands/ec2/create_security_group.rb, line 44
def get_command
  command = "ec2 create-security-group"
  command = "#{command} --vpc-id #{@vpc_id}" if @vpc_id
  command = "#{command} --group-name #{@group_name}" if @group_name
  command = "#{command} --description '#{@description}'" if @description
  return command
end
group_name(name) click to toggle source
# File lib/zaws/external/awscli/commands/ec2/create_security_group.rb, line 34
def group_name(name)
  @group_name=name
  self
end
vpc_id(vpc_id) click to toggle source
# File lib/zaws/external/awscli/commands/ec2/create_security_group.rb, line 29
def vpc_id(vpc_id)
  @vpc_id=vpc_id
  self
end