Class: ZAWS::External::AWSCLI::Commands::EC2::RevokeSecurityGroupIngress
- Inherits:
-
Object
- Object
- ZAWS::External::AWSCLI::Commands::EC2::RevokeSecurityGroupIngress
- Defined in:
- lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb
Instance Method Summary collapse
- #aws ⇒ Object
- #cidr(cidr) ⇒ Object
- #clear_settings ⇒ Object
- #get_command ⇒ Object
- #group_id(id) ⇒ Object
-
#initialize(shellout = nil, awscli = nil) ⇒ RevokeSecurityGroupIngress
constructor
A new instance of RevokeSecurityGroupIngress.
- #port(port) ⇒ Object
- #protocol(protocol) ⇒ Object
- #source_group(group) ⇒ Object
Constructor Details
#initialize(shellout = nil, awscli = nil) ⇒ RevokeSecurityGroupIngress
Returns a new instance of RevokeSecurityGroupIngress.
7 8 9 10 11 12 |
# File 'lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.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/revoke_security_group_ingress.rb', line 14 def aws @aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self) @aws end |
#cidr(cidr) ⇒ Object
39 40 41 42 |
# File 'lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb', line 39 def cidr(cidr) @cidr=cidr self end |
#clear_settings ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb', line 19 def clear_settings @group_id=nil @cidr=nil @protocol=nil @port=nil @aws=nil @source_group=nil self end |
#get_command ⇒ Object
54 55 56 57 58 59 60 61 62 |
# File 'lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb', line 54 def get_command command = "ec2 revoke-security-group-ingress" command = "#{command} --group-id #{@group_id}" if @group_id command = "#{command} --source-group #{@source_group}" if @source_group command = "#{command} --cidr #{@cidr}" if @cidr command = "#{command} --protocol #{@protocol}" if @protocol command = "#{command} --port #{@port}" if @port return command end |
#group_id(id) ⇒ Object
34 35 36 37 |
# File 'lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb', line 34 def group_id(id) @group_id=id self end |
#port(port) ⇒ Object
49 50 51 52 |
# File 'lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb', line 49 def port(port) @port=port self end |
#protocol(protocol) ⇒ Object
44 45 46 47 |
# File 'lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb', line 44 def protocol(protocol) @protocol=protocol self end |
#source_group(group) ⇒ Object
29 30 31 32 |
# File 'lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb', line 29 def source_group(group) @source_group=group self end |