An Amazon EC2 interface to create, delete, describe, grand and revoke sercurity permissions.
category | Zend |
---|---|
package | Zend_Service_Amazon |
subpackage | Ec2 |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Service_Amazon_Ec2_Abstract |
__construct($accessKey= null
, $secretKey= null
) : void
create(string $name, string $description) : boolean
Every instance is launched in a security group. If no security group is specified during launch, the instances are launched in the default security group. Instances within the same security group have unrestricted network access to each other. Instances will reject network access attempts from other instances in a different security group. As the owner of instances you can grant or revoke specific permissions using the \authorizeIp, \authorizeGroup, \revokeGroup and {$link revokeIp} operations.
string
Name of the new security group.
string
Description of the new security group.
boolean
delete(string $name) : boolean
If you attempt to delete a security group that contains instances, a fault is returned. If you attempt to delete a security group that is referenced by another security group, a fault is returned. For example, if security group B has a rule that allows access from security group A, security group A cannot be deleted until the allow rule is removed.
string
Name of the security group to delete.
boolean
describe(string|array $name = null
) : array
If you specify security group names, information about those security group is returned. Otherwise, information for all security group is returned. If you specify a group that does not exist, a fault is returned.
string
array
List of security groups to describe
array
getHttpClient() : \Zend_Http_Client
\Zend_Http_Client
revokeGroup(string $name, string $groupName, string $ownerId) : boolean
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.
When revoking a user/group pair permission, GroupName, SourceSecurityGroupName and SourceSecurityGroupOwnerId must be specified.
string
Name of the group to modify.
string
Name of security group to revoke access to when operating on a user/group pair.
string
Owner of security group to revoke access to when operating on a user/group pair.
boolean
revokeIp(string $name, string $ipProtocol, integer $fromPort, integer $toPort, string $cidrIp) : boolean
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.
string
Name of the group to modify.
string
IP protocol to revoke access to when operating on a CIDR IP.
integer
Bottom of port range to revoke access to when operating on a CIDR IP. This contains the ICMP type if ICMP is being revoked.
integer
Top of port range to revoked access to when operating on a CIDR IP. This contains the ICMP code if ICMP is being revoked.
string
CIDR IP range to revoke access to when operating on a CIDR IP.
boolean
setHttpClient(\Zend_Http_Client $httpClient)
\Zend_Http_Client
setKeys($accessKey, $secretKey) : void
setRegion(string $region)
string
_getAccessKey() : string
string
_getRegion() : string
string
_getSecretKey() : string
string
addRequiredParameters(array $parameters) : array
The required parameters are:
If a required parameter is already set in the $parameters array, it is overwritten.
array
the array to which to add the required parameters.
array
sendRequest(array $params = array()
) : \Zend_Service_Amazon_Ec2_Response
array
List of parameters to send with the request
\Zend_Service_Amazon_Ec2_Exception |
---|
\Zend_Service_Amazon_Ec2_Response
signParameters(array $paramaters) : string
This implements the Amazon Web Services signature, as per the following specification:
Sort all request parameters (including SignatureVersion and excluding Signature, the value of which is being created), ignoring case.
string
the signed data.checkForErrors(\Zend_Service_Amazon_Ec2_Response $response) : void
\Zend_Service_Amazon_Ec2_Response
the response object to check.
\Zend_Service_Amazon_Ec2_Exception |
if one or more errors are returned from Amazon. |
---|
$_accessKey : string
$_defaultAccessKey : string
null
$_defaultRegion : string
null
$_defaultSecretKey : string
null
$_ec2ApiVersion
'2009-04-04'
$_ec2Endpoint
'ec2.amazonaws.com'
$_ec2SignatureMethod
'HmacSHA256'
$_ec2SignatureVersion
'2'
$_httpClient : \Zend_Http_Client
null
$_httpTimeout
10
$_region : string
$_secretKey : string
$_validEc2Regions : array
array('eu-west-1', 'us-east-1')