This handler uses the AWS REST API to Add a security group ingress rule to a security group. This handler implements a subset of the full AWS call (single rule submission only). Most of the inputs for this handler are conditionally required based on other input values. Source Security Group Name is required if a CIDR IP Address Name isn't specified and vice versa. Also, if a Source Security Group Name and/or Source Security Group Owner ID are provided, the IP Protocol, From Port, To Port, and CIDR IP Address Range must be left blank. This handler returns no results, so if no errors are caught and raised the rule has been successfully applied.
More specific information about these parameters can be found in the Amazon EC2 Ruby documentation (http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Client.html#authorize_security_group_ingress-instance_method) and in the EC2 REST documentation (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group-ingress.html).
The Dry Run parameter validates user permissions and inputs. If it is set to true, an error will always be thrown by the handler before completing the handler action. Error response will be 'DryRunOperation' if the account has proper permissions and inputs; 'UnauthorizedOperation' if the account does not have proper permissions.