Class: ZAWS::External::AWSCLI::Commands::EC2::AssociateRouteTable
- Inherits:
-
Object
- Object
- ZAWS::External::AWSCLI::Commands::EC2::AssociateRouteTable
- Defined in:
- lib/zaws/external/awscli/commands/ec2/associate_route_table.rb
Instance Method Summary collapse
- #aws ⇒ Object
- #clear_settings ⇒ Object
- #get_command ⇒ Object
-
#initialize(shellout = nil, awscli = nil) ⇒ AssociateRouteTable
constructor
A new instance of AssociateRouteTable.
- #route_table_id(id) ⇒ Object
- #subnet_id(id) ⇒ Object
Constructor Details
#initialize(shellout = nil, awscli = nil) ⇒ AssociateRouteTable
Returns a new instance of AssociateRouteTable.
7 8 9 10 11 12 |
# File 'lib/zaws/external/awscli/commands/ec2/associate_route_table.rb', line 7 def initialize(shellout=nil, awscli=nil) @shellout=shellout @awscli=awscli clear_settings self end |
Instance Method Details
#aws ⇒ Object
14 15 16 17 |
# File 'lib/zaws/external/awscli/commands/ec2/associate_route_table.rb', line 14 def aws @aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self) @aws end |
#clear_settings ⇒ Object
19 20 21 22 23 24 |
# File 'lib/zaws/external/awscli/commands/ec2/associate_route_table.rb', line 19 def clear_settings @subnet_id=nil @route_table_id=nil @aws=nil self end |
#get_command ⇒ Object
36 37 38 39 40 41 |
# File 'lib/zaws/external/awscli/commands/ec2/associate_route_table.rb', line 36 def get_command command = "ec2 associate-route-table" command = "#{command} --subnet-id #{@subnet_id}" if @subnet_id command = "#{command} --route-table-id #{@route_table_id}" if @route_table_id return command end |
#route_table_id(id) ⇒ Object
31 32 33 34 |
# File 'lib/zaws/external/awscli/commands/ec2/associate_route_table.rb', line 31 def route_table_id(id) @route_table_id=id self end |
#subnet_id(id) ⇒ Object
26 27 28 29 |
# File 'lib/zaws/external/awscli/commands/ec2/associate_route_table.rb', line 26 def subnet_id(id) @subnet_id=id self end |