Method: Fog::Compute::AWS::Real#authorize_security_group_ingress
- Defined in:
- lib/fog/aws/requests/compute/authorize_security_group_ingress.rb
permalink #authorize_security_group_ingress(group_name, options = {}) ⇒ Object
Add permissions to a security group
Parameters
-
group_name<~String> - Name of group, optional (can also be specifed as GroupName in options)
-
options<~Hash>:
-
‘GroupName’<~String> - Name of security group to modify
-
‘GroupId’<~String> - Id of security group to modify
-
‘SourceSecurityGroupName’<~String> - Name of security group to authorize
-
‘SourceSecurityGroupOwnerId’<~String> - Name of owner to authorize
or
-
‘CidrIp’<~String> - CIDR range
-
‘FromPort’<~Integer> - Start of port range (or -1 for ICMP wildcard)
-
‘IpProtocol’<~String> - Ip protocol, must be in [‘tcp’, ‘udp’, ‘icmp’]
-
‘ToPort’<~Integer> - End of port range (or -1 for ICMP wildcard)
or
-
‘IpPermissions’<~Array>:
-
permission<~Hash>:
-
‘FromPort’<~Integer> - Start of port range (or -1 for ICMP wildcard)
-
‘Groups’<~Array>:
-
group<~Hash>:
-
‘GroupName’<~String> - Name of security group to authorize
-
‘UserId’<~String> - Name of owner to authorize
-
-
-
‘IpProtocol’<~String> - Ip protocol, must be in [‘tcp’, ‘udp’, ‘icmp’]
-
‘IpRanges’<~Array>:
-
ip_range<~Hash>:
-
‘CidrIp’<~String> - CIDR range
-
-
-
‘ToPort’<~Integer> - End of port range (or -1 for ICMP wildcard)
-
-
-
Returns
-
response<~Excon::Response>:
-
body<~Hash>:
-
‘requestId’<~String> - Id of request
-
‘return’<~Boolean> - success?
-
-
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/fog/aws/requests/compute/authorize_security_group_ingress.rb', line 43 def (group_name, = {}) = Fog::AWS.(group_name, ) if = .delete('IpPermissions') .merge!(()) end request({ 'Action' => 'AuthorizeSecurityGroupIngress', :idempotent => true, :parser => Fog::Parsers::Compute::AWS::Basic.new }.merge!()) end |