Class: ZAWS::External::AWSCLI::Commands::EC2::UnassignPrivateIpAddresses

Inherits:
Object
  • Object
show all
Defined in:
lib/zaws/external/awscli/commands/ec2/unassign_private_ip_addresses.rb

Instance Method Summary collapse

Constructor Details

#initialize(shellout = nil, awscli = nil) ⇒ UnassignPrivateIpAddresses

Returns a new instance of UnassignPrivateIpAddresses.



7
8
9
10
11
12
# File 'lib/zaws/external/awscli/commands/ec2/unassign_private_ip_addresses.rb', line 7

def initialize(shellout=nil, awscli=nil)
  @shellout=shellout
  @awscli=awscli
  clear_settings
  self
end

Instance Method Details

#awsObject



14
15
16
17
# File 'lib/zaws/external/awscli/commands/ec2/unassign_private_ip_addresses.rb', line 14

def aws
  @aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self)
  @aws
end

#clear_settingsObject



19
20
21
22
23
24
# File 'lib/zaws/external/awscli/commands/ec2/unassign_private_ip_addresses.rb', line 19

def clear_settings
  @network_interface_id=nil
  @private_ip_addresses=nil
  @aws=nil
  self
end

#get_commandObject



36
37
38
39
40
41
# File 'lib/zaws/external/awscli/commands/ec2/unassign_private_ip_addresses.rb', line 36

def get_command
  command = "ec2 unassign-private-ip-addresses"
  command = "#{command} --network-interface-id \"#{@network_interface_id}\"" if @network_interface_id
  command = "#{command} --private-ip-addresses \"#{@private_ip_addresses}\"" if @private_ip_addresses
  return command
end

#network_interface_id(id) ⇒ Object



26
27
28
29
# File 'lib/zaws/external/awscli/commands/ec2/unassign_private_ip_addresses.rb', line 26

def network_interface_id(id)
  @network_interface_id=id
  self
end

#private_ip_addresses(ip) ⇒ Object



31
32
33
34
# File 'lib/zaws/external/awscli/commands/ec2/unassign_private_ip_addresses.rb', line 31

def private_ip_addresses(ip)
  @private_ip_addresses=ip
  self
end