Example 749. Revoke by IP
revokeIp Revokes permissions to a security group based on
an IP address, protocol type and port range. The permissions used to revoke
must be specified using the same values used to grant the permissions.
Permissions are specified by the IP protocol (TCP, UDP or ICMP), the source of the request (by IP range or an Amazon EC2 user-group pair), the source and destination port ranges (for TCP and UDP), and the ICMP codes and types (for ICMP). When authorizing ICMP, -1 can be used as a wildcard in the type and code fields.
Permission changes are propagated to instances within the security group as quickly as possible. However, depending on the number of instances, a small delay might occur.
revokeIp returns boolean TRUE or
FALSE
<?php
$ec2_sg = new Zend_Service_Amazon_Ec2_Securitygroups('aws_key',
'aws_secret_key');
$return = $ec2_sg->revokeIp('mygroup',
'protocol',
'fromPort',
'toPort',
'ipRange');
Example 750. Revoke By Group
revokeGroup Adds permissions to a security group. The permissions
to revoke must be specified using the same values used to grant the
permissions.
Permission changes are propagated to instances within the security group as quickly as possible. However, depending on the number of instances, a small delay might occur.
revokeGroup returns boolean TRUE or
FALSE.
<?php
$ec2_sg = new Zend_Service_Amazon_Ec2_Securitygroups('aws_key',
'aws_secret_key');
$return = $ec2_sg->revokeGroup('mygroup', 'securityGroupName', 'ownerId');




