Index: trunk/extensions/OpenStackManager/aws-sdk/services/cloudformation.class.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | * Amazon CloudFormation makes use of other AWS products. If you need additional technical information about a specific AWS product, you can |
50 | 50 | * find the product's technical documentation at <a href="http://aws.amazon.com/documentation/">http://aws.amazon.com/documentation/</a>. |
51 | 51 | * |
52 | | - * @version Wed Aug 03 10:08:29 PDT 2011 |
| 52 | + * @version Tue Aug 23 12:45:39 PDT 2011 |
53 | 53 | * @license See the included NOTICE.md file for complete information. |
54 | 54 | * @copyright See the included NOTICE.md file for complete information. |
55 | 55 | * @link http://aws.amazon.com/cloudformation/Amazon CloudFormation |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/rds.class.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | * instance's compute resources and storage capacity to meet your application's demand. As with all Amazon Web Services, there are no up-front |
29 | 29 | * investments, and you pay only for the resources you use. |
30 | 30 | * |
31 | | - * @version Wed Aug 03 10:13:10 PDT 2011 |
| 31 | + * @version Tue Aug 23 12:50:31 PDT 2011 |
32 | 32 | * @license See the included NOTICE.md file for complete information. |
33 | 33 | * @copyright See the included NOTICE.md file for complete information. |
34 | 34 | * @link http://aws.amazon.com/rds/Amazon Relational Database Service |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/ses.class.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | * For specific details on how to construct a service request, please consult the <a |
25 | 25 | * href="http://docs.amazonwebservices.com/ses/latest/DeveloperGuide">Amazon SES Developer Guide</a>. |
26 | 26 | * |
27 | | - * @version Wed Aug 03 10:11:14 PDT 2011 |
| 27 | + * @version Tue Aug 23 12:48:39 PDT 2011 |
28 | 28 | * @license See the included NOTICE.md file for complete information. |
29 | 29 | * @copyright See the included NOTICE.md file for complete information. |
30 | 30 | * @link http://aws.amazon.com/ses/Amazon Simple Email Service |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/cloudwatch.class.php |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | * |
49 | 49 | * </ul> |
50 | 50 | * |
51 | | - * @version Wed Aug 03 10:09:00 PDT 2011 |
| 51 | + * @version Tue Aug 23 12:46:08 PDT 2011 |
52 | 52 | * @license See the included NOTICE.md file for complete information. |
53 | 53 | * @copyright See the included NOTICE.md file for complete information. |
54 | 54 | * @link http://aws.amazon.com/cloudwatch/Amazon CloudWatch |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/elb.class.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | * application. It makes it easy for you to distribute application loads between two or more EC2 instances. Elastic Load Balancing enables |
23 | 23 | * availability through redundancy and supports traffic growth of your application. |
24 | 24 | * |
25 | | - * @version Wed Aug 03 10:10:44 PDT 2011 |
| 25 | + * @version Tue Aug 23 12:48:10 PDT 2011 |
26 | 26 | * @license See the included NOTICE.md file for complete information. |
27 | 27 | * @copyright See the included NOTICE.md file for complete information. |
28 | 28 | * @link http://aws.amazon.com/elasticloadbalancing/Amazon Elastic Load Balancing |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/as.class.php |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | * href="http://docs.amazonwebservices.com/general/latest/gr/index.html?rande.html">Regions and Endpoints</a> in the Amazon Web Services |
40 | 40 | * General Reference. |
41 | 41 | * |
42 | | - * @version Wed Aug 03 10:07:42 PDT 2011 |
| 42 | + * @version Tue Aug 23 12:45:05 PDT 2011 |
43 | 43 | * @license See the included NOTICE.md file for complete information. |
44 | 44 | * @copyright See the included NOTICE.md file for complete information. |
45 | 45 | * @link http://aws.amazon.com/autoscaling/Amazon Auto-Scaling |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/sns.class.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | /** |
19 | 19 | |
20 | 20 | * |
21 | | - * @version Wed Aug 03 10:14:08 PDT 2011 |
| 21 | + * @version Tue Aug 23 12:51:26 PDT 2011 |
22 | 22 | * @license See the included NOTICE.md file for complete information. |
23 | 23 | * @copyright See the included NOTICE.md file for complete information. |
24 | 24 | * @link http://aws.amazon.com/sns/Amazon Simple Notification Service |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/elasticache.class.php |
— | — | @@ -0,0 +1,585 @@ |
| 2 | +<?php |
| 3 | +/* |
| 4 | + * Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 5 | + * |
| 6 | + * Licensed under the Apache License, Version 2.0 (the "License"). |
| 7 | + * You may not use this file except in compliance with the License. |
| 8 | + * A copy of the License is located at |
| 9 | + * |
| 10 | + * http://aws.amazon.com/apache2.0 |
| 11 | + * |
| 12 | + * or in the "license" file accompanying this file. This file is distributed |
| 13 | + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 14 | + * express or implied. See the License for the specific language governing |
| 15 | + * permissions and limitations under the License. |
| 16 | + */ |
| 17 | + |
| 18 | +/** |
| 19 | + * |
| 20 | + * |
| 21 | + * Amazon ElastiCache is a web service that makes it easier to set up, operate, and scale a distributed cache in the cloud. |
| 22 | + * |
| 23 | + * With Amazon ElastiCache, customers gain all of the benefits of a high-performance, in-memory cache with far less of the administrative |
| 24 | + * burden of launching and managing a distributed cache. The service makes set-up, scaling, and cluster failure handling much simpler than in a |
| 25 | + * self-managed cache deployment. |
| 26 | + * |
| 27 | + * In addition, through integration with Amazon CloudWatch, customers get enhanced visibility into the key performance statistics associated |
| 28 | + * with their cache and can receive alarms if a part of their cache runs hot. |
| 29 | + * |
| 30 | + * @version Tue Aug 23 12:46:37 PDT 2011 |
| 31 | + * @license See the included NOTICE.md file for complete information. |
| 32 | + * @copyright See the included NOTICE.md file for complete information. |
| 33 | + * @link http://aws.amazon.com/elasticache/AWS ElastiCache |
| 34 | + * @link http://aws.amazon.com/documentation/elasticache/AWS ElastiCache documentation |
| 35 | + */ |
| 36 | +class AmazonElastiCache extends CFRuntime |
| 37 | +{ |
| 38 | + |
| 39 | + /*%******************************************************************************************%*/ |
| 40 | + // CLASS CONSTANTS |
| 41 | + |
| 42 | + /** |
| 43 | + * Specify the default queue URL. |
| 44 | + */ |
| 45 | + const DEFAULT_URL = 'elasticache.us-east-1.amazonaws.com'; |
| 46 | + |
| 47 | + /** |
| 48 | + * Specify the queue URL for the US-East (Northern Virginia) Region. |
| 49 | + */ |
| 50 | + const REGION_US_E1 = 'us-east-1'; |
| 51 | + |
| 52 | + |
| 53 | + /*%******************************************************************************************%*/ |
| 54 | + // SETTERS |
| 55 | + |
| 56 | + /** |
| 57 | + * This allows you to explicitly sets the region for the service to use. |
| 58 | + * |
| 59 | + * @param string $region (Required) The region to explicitly set. Available options are <REGION_US_E1>. |
| 60 | + * @return $this A reference to the current instance. |
| 61 | + */ |
| 62 | + public function set_region($region) |
| 63 | + { |
| 64 | + $this->set_hostname('http://elasticache.'. $region .'.amazonaws.com'); |
| 65 | + return $this; |
| 66 | + } |
| 67 | + |
| 68 | + |
| 69 | + /*%******************************************************************************************%*/ |
| 70 | + // CONSTRUCTOR |
| 71 | + |
| 72 | + /** |
| 73 | + * Constructs a new instance of <AmazonElastiCache>. |
| 74 | + * |
| 75 | + * @param string $key (Optional) Your Amazon API Key. If blank, it will look for the <code>AWS_KEY</code> constant. |
| 76 | + * @param string $secret_key (Optional) Your Amazon API Secret Key. If blank, it will look for the <code>AWS_SECRET_KEY</code> constant. |
| 77 | + * @return boolean false if no valid values are set, otherwise true. |
| 78 | + */ |
| 79 | + public function __construct($key = null, $secret_key = null) |
| 80 | + { |
| 81 | + $this->api_version = '2011-07-15'; |
| 82 | + $this->hostname = self::DEFAULT_URL; |
| 83 | + |
| 84 | + if (!$key && !defined('AWS_KEY')) |
| 85 | + { |
| 86 | + // @codeCoverageIgnoreStart |
| 87 | + throw new ElastiCache_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.'); |
| 88 | + // @codeCoverageIgnoreEnd |
| 89 | + } |
| 90 | + |
| 91 | + if (!$secret_key && !defined('AWS_SECRET_KEY')) |
| 92 | + { |
| 93 | + // @codeCoverageIgnoreStart |
| 94 | + throw new ElastiCache_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.'); |
| 95 | + // @codeCoverageIgnoreEnd |
| 96 | + } |
| 97 | + |
| 98 | + return parent::__construct($key, $secret_key); |
| 99 | + } |
| 100 | + |
| 101 | + |
| 102 | + /*%******************************************************************************************%*/ |
| 103 | + // SERVICE METHODS |
| 104 | + |
| 105 | + /** |
| 106 | + * |
| 107 | + * This API returns the default engine and system parameter information for the specified cache engine. |
| 108 | + * |
| 109 | + * @param string $cache_parameter_group_family (Required) The name of the Cache Parameter Group Family. Currently, <i>memcached1.4</i> is the only cache parameter group family supported by the service. |
| 110 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 111 | + * <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. </li> |
| 112 | + * <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li> |
| 113 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 114 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 115 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 116 | + */ |
| 117 | + public function describe_engine_default_parameters($cache_parameter_group_family, $opt = null) |
| 118 | + { |
| 119 | + if (!$opt) $opt = array(); |
| 120 | + $opt['CacheParameterGroupFamily'] = $cache_parameter_group_family; |
| 121 | + |
| 122 | + return $this->authenticate('DescribeEngineDefaultParameters', $opt, $this->hostname); |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * |
| 127 | + * This API modifies the parameters of a CacheParameterGroup. To modify more than one parameter submit a list of the following: ParameterName |
| 128 | + * and ParameterValue. A maximum of 20 parameters can be modified in a single request. |
| 129 | + * |
| 130 | + * @param string $cache_parameter_group_name (Required) The name of the cache parameter group to modify. |
| 131 | + * @param array $parameter_name_values (Required) An array of parameter names and values for the parameter update. At least one parameter name and value must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request. <ul> |
| 132 | + * <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul> |
| 133 | + * <li><code>ParameterName</code> - <code>string</code> - Optional - Specifies the name of the parameter. </li> |
| 134 | + * <li><code>ParameterValue</code> - <code>string</code> - Optional - Specifies the value of the parameter. </li> |
| 135 | + * </ul></li> |
| 136 | + * </ul> |
| 137 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 138 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 139 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 140 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 141 | + */ |
| 142 | + public function modify_cache_parameter_group($cache_parameter_group_name, $parameter_name_values, $opt = null) |
| 143 | + { |
| 144 | + if (!$opt) $opt = array(); |
| 145 | + $opt['CacheParameterGroupName'] = $cache_parameter_group_name; |
| 146 | + |
| 147 | + // Required parameter |
| 148 | + $opt = array_merge($opt, CFComplexType::map(array( |
| 149 | + 'ParameterNameValues' => (is_array($parameter_name_values) ? $parameter_name_values : array($parameter_name_values)) |
| 150 | + ), 'member')); |
| 151 | + |
| 152 | + return $this->authenticate('ModifyCacheParameterGroup', $opt, $this->hostname); |
| 153 | + } |
| 154 | + |
| 155 | + /** |
| 156 | + * |
| 157 | + * Creates a new Cache Cluster. |
| 158 | + * |
| 159 | + * @param string $cache_cluster_id (Required) The Cache Cluster identifier. This parameter is stored as a lowercase string. Constraints: <ul> <li>Must contain from 1 to 20 alphanumeric characters or hyphens.</li><li>First character must be a letter.</li><li>Cannot end with a hyphen or contain two consecutive hyphens.</li> </ul> Example: <code>mycachecluster</code> |
| 160 | + * @param integer $num_cache_nodes (Required) The number of Cache Nodes the Cache Cluster should have. |
| 161 | + * @param string $cache_node_type (Required) The compute and memory capacity of nodes in a Cache Cluster. Valid values: <code>cache.m1.large | cache.m1.xlarge | cache.m2.xlarge | cache.m2.2xlarge | cache.m2.4xlarge | cache.c1.xlarge </code> |
| 162 | + * @param string $engine (Required) The name of the cache engine to be used for this Cache Cluster. Currently, <i>memcached</i> is the only cache engine supported by the service. |
| 163 | + * @param string|array $cache_security_group_names (Required) A list of Cache Security Group Names to associate with this Cache Cluster. Pass a string for a single value, or an indexed array for multiple values. |
| 164 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 165 | + * <li><code>EngineVersion</code> - <code>string</code> - Optional - The version of the cache engine to be used for this cluster. </li> |
| 166 | + * <li><code>CacheParameterGroupName</code> - <code>string</code> - Optional - The name of the cache parameter group to associate with this Cache cluster. If this argument is omitted, the default CacheParameterGroup for the specified engine will be used. </li> |
| 167 | + * <li><code>PreferredAvailabilityZone</code> - <code>string</code> - Optional - The EC2 Availability Zone that the Cache Cluster will be created in. In normal use, all CacheNodes belonging to a CacheCluster are placed in the preferred availability zone. In rare circumstances, some of the CacheNodes might temporarily be in a different availability zone. Default: System chosen (random) availability zone. </li> |
| 168 | + * <li><code>PreferredMaintenanceWindow</code> - <code>string</code> - Optional - The weekly time range (in UTC) during which system maintenance can occur. Example: <code>sun:05:00-sun:09:00</code> </li> |
| 169 | + * <li><code>Port</code> - <code>integer</code> - Optional - The port number on which each of the Cache Nodes will accept connections. </li> |
| 170 | + * <li><code>NotificationTopicArn</code> - <code>string</code> - Optional - The Amazon Resource Name (ARN) of the SNS topic to which notifications will be sent. The SNS topic owner must be same as the Cache Cluster owner. </li> |
| 171 | + * <li><code>AutoMinorVersionUpgrade</code> - <code>boolean</code> - Optional - Indicates that minor engine upgrades will be applied automatically to the Cache Cluster during the maintenance window. Default: <code>true</code> </li> |
| 172 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 173 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 174 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 175 | + */ |
| 176 | + public function create_cache_cluster($cache_cluster_id, $num_cache_nodes, $cache_node_type, $engine, $cache_security_group_names, $opt = null) |
| 177 | + { |
| 178 | + if (!$opt) $opt = array(); |
| 179 | + $opt['CacheClusterId'] = $cache_cluster_id; |
| 180 | + $opt['NumCacheNodes'] = $num_cache_nodes; |
| 181 | + $opt['CacheNodeType'] = $cache_node_type; |
| 182 | + $opt['Engine'] = $engine; |
| 183 | + |
| 184 | + // Required parameter |
| 185 | + $opt = array_merge($opt, CFComplexType::map(array( |
| 186 | + 'CacheSecurityGroupNames' => (is_array($cache_security_group_names) ? $cache_security_group_names : array($cache_security_group_names)) |
| 187 | + ), 'member')); |
| 188 | + |
| 189 | + return $this->authenticate('CreateCacheCluster', $opt, $this->hostname); |
| 190 | + } |
| 191 | + |
| 192 | + /** |
| 193 | + * |
| 194 | + * Authorizes ingress to a CacheSecurityGroup using EC2 Security Groups as authorization (therefore the application using the cache must be |
| 195 | + * running on EC2 clusters). This API requires the following parameters: EC2SecurityGroupName and EC2SecurityGroupOwnerId. |
| 196 | + * |
| 197 | + * You cannot authorize ingress from an EC2 security group in one Region to an Amazon Cache Cluster in another. |
| 198 | + * |
| 199 | + * @param string $cache_security_group_name (Required) The name of the Cache Security Group to authorize. |
| 200 | + * @param string $ec2_security_group_name (Required) Name of the EC2 Security Group to include in the authorization. |
| 201 | + * @param string $ec2_security_group_owner_id (Required) AWS Account Number of the owner of the security group specified in the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable value. |
| 202 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 203 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 204 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 205 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 206 | + */ |
| 207 | + public function authorize_cache_security_group_ingress($cache_security_group_name, $ec2_security_group_name, $ec2_security_group_owner_id, $opt = null) |
| 208 | + { |
| 209 | + if (!$opt) $opt = array(); |
| 210 | + $opt['CacheSecurityGroupName'] = $cache_security_group_name; |
| 211 | + $opt['EC2SecurityGroupName'] = $ec2_security_group_name; |
| 212 | + $opt['EC2SecurityGroupOwnerId'] = $ec2_security_group_owner_id; |
| 213 | + |
| 214 | + return $this->authenticate('AuthorizeCacheSecurityGroupIngress', $opt, $this->hostname); |
| 215 | + } |
| 216 | + |
| 217 | + /** |
| 218 | + * |
| 219 | + * Creates a new Cache Security Group. Cache Security groups control access to one or more Cache Clusters. |
| 220 | + * |
| 221 | + * @param string $cache_security_group_name (Required) The name for the Cache Security Group. This value is stored as a lowercase string. Constraints: Must contain no more than 255 alphanumeric characters. Must not be "Default". Example: <code>mysecuritygroup</code> |
| 222 | + * @param string $description (Required) The description for the Cache Security Group. |
| 223 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 224 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 225 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 226 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 227 | + */ |
| 228 | + public function create_cache_security_group($cache_security_group_name, $description, $opt = null) |
| 229 | + { |
| 230 | + if (!$opt) $opt = array(); |
| 231 | + $opt['CacheSecurityGroupName'] = $cache_security_group_name; |
| 232 | + $opt['Description'] = $description; |
| 233 | + |
| 234 | + return $this->authenticate('CreateCacheSecurityGroup', $opt, $this->hostname); |
| 235 | + } |
| 236 | + |
| 237 | + /** |
| 238 | + * |
| 239 | + * Deletes a previously provisioned Cache Cluster. A successful response from the web service indicates the request was received correctly. |
| 240 | + * This action cannot be canceled or reverted. DeleteCacheCluster deletes all associated Cache Nodes, node endpoints and the Cache Cluster |
| 241 | + * itself. |
| 242 | + * |
| 243 | + * @param string $cache_cluster_id (Required) The Cache Cluster identifier for the Cache Cluster to be deleted. This parameter isn't case sensitive. |
| 244 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 245 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 246 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 247 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 248 | + */ |
| 249 | + public function delete_cache_cluster($cache_cluster_id, $opt = null) |
| 250 | + { |
| 251 | + if (!$opt) $opt = array(); |
| 252 | + $opt['CacheClusterId'] = $cache_cluster_id; |
| 253 | + |
| 254 | + return $this->authenticate('DeleteCacheCluster', $opt, $this->hostname); |
| 255 | + } |
| 256 | + |
| 257 | + /** |
| 258 | + * |
| 259 | + * Returns a list of CacheSecurityGroup descriptions. If a CacheSecurityGroupName is specified, the list will contain only the description of |
| 260 | + * the specified CacheSecurityGroup. |
| 261 | + * |
| 262 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 263 | + * <li><code>CacheSecurityGroupName</code> - <code>string</code> - Optional - The name of the Cache Security Group to return details for. </li> |
| 264 | + * <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100 </li> |
| 265 | + * <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li> |
| 266 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 267 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 268 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 269 | + */ |
| 270 | + public function describe_cache_security_groups($opt = null) |
| 271 | + { |
| 272 | + if (!$opt) $opt = array(); |
| 273 | + |
| 274 | + return $this->authenticate('DescribeCacheSecurityGroups', $opt, $this->hostname); |
| 275 | + } |
| 276 | + |
| 277 | + /** |
| 278 | + * |
| 279 | + * This API returns a list of CacheParameterGroup descriptions. If a CacheParameterGroupName is specified, the list will contain only the |
| 280 | + * descriptions of the specified CacheParameterGroup. |
| 281 | + * |
| 282 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 283 | + * <li><code>CacheParameterGroupName</code> - <code>string</code> - Optional - The name of a specific cache parameter group to return details for. </li> |
| 284 | + * <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. </li> |
| 285 | + * <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheParameterGroups request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li> |
| 286 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 287 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 288 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 289 | + */ |
| 290 | + public function describe_cache_parameter_groups($opt = null) |
| 291 | + { |
| 292 | + if (!$opt) $opt = array(); |
| 293 | + |
| 294 | + return $this->authenticate('DescribeCacheParameterGroups', $opt, $this->hostname); |
| 295 | + } |
| 296 | + |
| 297 | + /** |
| 298 | + * |
| 299 | + * Returns the detailed parameter list for a particular CacheParameterGroup. |
| 300 | + * |
| 301 | + * @param string $cache_parameter_group_name (Required) The name of a specific cache parameter group to return details for. |
| 302 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 303 | + * <li><code>Source</code> - <code>string</code> - Optional - The parameter types to return. Valid values: <code>user</code> | <code>system</code> | <code>engine-default</code> </li> |
| 304 | + * <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. </li> |
| 305 | + * <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li> |
| 306 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 307 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 308 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 309 | + */ |
| 310 | + public function describe_cache_parameters($cache_parameter_group_name, $opt = null) |
| 311 | + { |
| 312 | + if (!$opt) $opt = array(); |
| 313 | + $opt['CacheParameterGroupName'] = $cache_parameter_group_name; |
| 314 | + |
| 315 | + return $this->authenticate('DescribeCacheParameters', $opt, $this->hostname); |
| 316 | + } |
| 317 | + |
| 318 | + /** |
| 319 | + * |
| 320 | + * This API returns events related to Cache Clusters, Cache Security Groups, and Cache Parameter Groups for the past 14 days. Events specific |
| 321 | + * to a particular Cache Cluster, cache security group, or cache parameter group can be obtained by providing the name as a parameter. By |
| 322 | + * default, the past hour of events are returned. |
| 323 | + * |
| 324 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 325 | + * <li><code>SourceIdentifier</code> - <code>string</code> - Optional - The identifier of the event source for which events will be returned. If not specified, then all sources are included in the response. </li> |
| 326 | + * <li><code>SourceType</code> - <code>string</code> - Optional - The event source to retrieve events for. If no value is specified, all events are returned. [Allowed values: <code>cache-cluster</code>, <code>cache-parameter-group</code>, <code>cache-security-group</code>]</li> |
| 327 | + * <li><code>StartTime</code> - <code>string</code> - Optional - The beginning of the time interval to retrieve events for, specified in ISO 8601 format. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li> |
| 328 | + * <li><code>EndTime</code> - <code>string</code> - Optional - The end of the time interval for which to retrieve events, specified in ISO 8601 format. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li> |
| 329 | + * <li><code>Duration</code> - <code>integer</code> - Optional - The number of minutes to retrieve events for. </li> |
| 330 | + * <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. </li> |
| 331 | + * <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li> |
| 332 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 333 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 334 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 335 | + */ |
| 336 | + public function describe_events($opt = null) |
| 337 | + { |
| 338 | + if (!$opt) $opt = array(); |
| 339 | + |
| 340 | + // Optional parameter |
| 341 | + if (isset($opt['StartTime'])) |
| 342 | + { |
| 343 | + $opt['StartTime'] = $this->util->convert_date_to_iso8601($opt['StartTime']); |
| 344 | + } |
| 345 | + |
| 346 | + // Optional parameter |
| 347 | + if (isset($opt['EndTime'])) |
| 348 | + { |
| 349 | + $opt['EndTime'] = $this->util->convert_date_to_iso8601($opt['EndTime']); |
| 350 | + } |
| 351 | + |
| 352 | + return $this->authenticate('DescribeEvents', $opt, $this->hostname); |
| 353 | + } |
| 354 | + |
| 355 | + /** |
| 356 | + * |
| 357 | + * Modifies Cache Cluster settings. You can change one or more Cache Cluster configuration parameters by specifying the parameters and the new |
| 358 | + * values in the request. |
| 359 | + * |
| 360 | + * @param string $cache_cluster_id (Required) The Cache Cluster identifier. This value is stored as a lowercase string. |
| 361 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 362 | + * <li><code>NumCacheNodes</code> - <code>integer</code> - Optional - The number of Cache Nodes the Cache Cluster should have. If NumCacheNodes is greater than the existing number of Cache Nodes, Cache Nodes will be added. If NumCacheNodes is less than the existing number of Cache Nodes, Cache Nodes will be removed. When removing Cache Nodes, the Ids of the specific Cache Nodes to be removed must be supplied using the CacheNodeIdsToRemove parameter. </li> |
| 363 | + * <li><code>CacheNodeIdsToRemove</code> - <code>string|array</code> - Optional - The list of Cache Node IDs to be removed. This parameter is only valid when NumCacheNodes is less than the existing number of Cache Nodes. The number of Cache Node Ids supplied in this parameter must match the difference between the existing number of Cache Nodes in the cluster and the new NumCacheNodes requested. Pass a string for a single value, or an indexed array for multiple values. </li> |
| 364 | + * <li><code>CacheSecurityGroupNames</code> - <code>string|array</code> - Optional - A list of Cache Security Group Names to authorize on this Cache Cluster. This change is asynchronously applied as soon as possible. Constraints: Must contain no more than 255 alphanumeric characters. Must not be "Default". Pass a string for a single value, or an indexed array for multiple values. </li> |
| 365 | + * <li><code>PreferredMaintenanceWindow</code> - <code>string</code> - Optional - The weekly time range (in UTC) during which system maintenance can occur, which may result in an outage. This change is made immediately. If moving this window to the current time, there must be at least 120 minutes between the current time and end of the window to ensure pending changes are applied. </li> |
| 366 | + * <li><code>NotificationTopicArn</code> - <code>string</code> - Optional - The Amazon resource name(ARN) of the SNS topic to which notifications will be sent. The SNS topic owner must be same as the Cache Cluster owner. </li> |
| 367 | + * <li><code>CacheParameterGroupName</code> - <code>string</code> - Optional - The name of the Cache Parameter Group to apply to this Cache Cluster. This change is asynchronously applied as soon as possible for parameters when the <i>ApplyImmediately</i> parameter is specified as <i>true</i> for this request. </li> |
| 368 | + * <li><code>NotificationTopicStatus</code> - <code>string</code> - Optional - The status of the SNS notification topic. The value can be <i>active</i> or <i>inactive</i>. Notifications are sent only if the status is <i>active</i>. </li> |
| 369 | + * <li><code>ApplyImmediately</code> - <code>boolean</code> - Optional - Specifies whether or not the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the <i>PreferredMaintenanceWindow</i> setting for the Cache Cluster. If this parameter is passed as <i>false</i>, changes to the Cache Cluster are applied on the next maintenance reboot, or the next failure reboot, whichever occurs first. The default value for this parameter is <i>false</i>. </li> |
| 370 | + * <li><code>EngineVersion</code> - <code>string</code> - Optional - The version of the cache engine to upgrade this cluster to. </li> |
| 371 | + * <li><code>AutoMinorVersionUpgrade</code> - <code>boolean</code> - Optional - Indicates that minor engine upgrades will be applied automatically to the Cache Cluster during the maintenance window. Default: <code>true</code> </li> |
| 372 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 373 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 374 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 375 | + */ |
| 376 | + public function modify_cache_cluster($cache_cluster_id, $opt = null) |
| 377 | + { |
| 378 | + if (!$opt) $opt = array(); |
| 379 | + $opt['CacheClusterId'] = $cache_cluster_id; |
| 380 | + |
| 381 | + // Optional parameter |
| 382 | + if (isset($opt['CacheNodeIdsToRemove'])) |
| 383 | + { |
| 384 | + $opt = array_merge($opt, CFComplexType::map(array( |
| 385 | + 'CacheNodeIdsToRemove' => (is_array($opt['CacheNodeIdsToRemove']) ? $opt['CacheNodeIdsToRemove'] : array($opt['CacheNodeIdsToRemove'])) |
| 386 | + ), 'member')); |
| 387 | + unset($opt['CacheNodeIdsToRemove']); |
| 388 | + } |
| 389 | + |
| 390 | + // Optional parameter |
| 391 | + if (isset($opt['CacheSecurityGroupNames'])) |
| 392 | + { |
| 393 | + $opt = array_merge($opt, CFComplexType::map(array( |
| 394 | + 'CacheSecurityGroupNames' => (is_array($opt['CacheSecurityGroupNames']) ? $opt['CacheSecurityGroupNames'] : array($opt['CacheSecurityGroupNames'])) |
| 395 | + ), 'member')); |
| 396 | + unset($opt['CacheSecurityGroupNames']); |
| 397 | + } |
| 398 | + |
| 399 | + return $this->authenticate('ModifyCacheCluster', $opt, $this->hostname); |
| 400 | + } |
| 401 | + |
| 402 | + /** |
| 403 | + * |
| 404 | + * This API modifies the parameters of a CacheParameterGroup to the engine/system default value. To reset specific parameters submit a list of |
| 405 | + * the parameter names. To reset the entire CacheParameterGroup specify the CacheParameterGroup name and ResetAllParameters parameters. |
| 406 | + * |
| 407 | + * @param string $cache_parameter_group_name (Required) The name of the Cache Parameter Group. |
| 408 | + * @param array $parameter_name_values (Required) An array of parameter names which should be reset. If not resetting the entire CacheParameterGroup, at least one parameter name must be supplied. <ul> |
| 409 | + * <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul> |
| 410 | + * <li><code>ParameterName</code> - <code>string</code> - Optional - Specifies the name of the parameter. </li> |
| 411 | + * <li><code>ParameterValue</code> - <code>string</code> - Optional - Specifies the value of the parameter. </li> |
| 412 | + * </ul></li> |
| 413 | + * </ul> |
| 414 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 415 | + * <li><code>ResetAllParameters</code> - <code>boolean</code> - Optional - Specifies whether (<i>true</i>) or not (<i>false</i>) to reset all parameters in the Cache Parameter Group to default values. </li> |
| 416 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 417 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 418 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 419 | + */ |
| 420 | + public function reset_cache_parameter_group($cache_parameter_group_name, $parameter_name_values, $opt = null) |
| 421 | + { |
| 422 | + if (!$opt) $opt = array(); |
| 423 | + $opt['CacheParameterGroupName'] = $cache_parameter_group_name; |
| 424 | + |
| 425 | + // Required parameter |
| 426 | + $opt = array_merge($opt, CFComplexType::map(array( |
| 427 | + 'ParameterNameValues' => (is_array($parameter_name_values) ? $parameter_name_values : array($parameter_name_values)) |
| 428 | + ), 'member')); |
| 429 | + |
| 430 | + return $this->authenticate('ResetCacheParameterGroup', $opt, $this->hostname); |
| 431 | + } |
| 432 | + |
| 433 | + /** |
| 434 | + * |
| 435 | + * This API deletes a particular CacheParameterGroup. The CacheParameterGroup cannot be deleted if it is associated with any cache clusters. |
| 436 | + * |
| 437 | + * @param string $cache_parameter_group_name (Required) The name of the Cache Parameter Group to delete. The specified cache security group must not be associated with any Cache clusters. |
| 438 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 439 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 440 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 441 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 442 | + */ |
| 443 | + public function delete_cache_parameter_group($cache_parameter_group_name, $opt = null) |
| 444 | + { |
| 445 | + if (!$opt) $opt = array(); |
| 446 | + $opt['CacheParameterGroupName'] = $cache_parameter_group_name; |
| 447 | + |
| 448 | + return $this->authenticate('DeleteCacheParameterGroup', $opt, $this->hostname); |
| 449 | + } |
| 450 | + |
| 451 | + /** |
| 452 | + * |
| 453 | + * Returns information about all provisioned Cache Clusters if no Cache Cluster identifier is specified, or about a specific Cache Cluster if |
| 454 | + * a Cache Cluster identifier is supplied. |
| 455 | + * |
| 456 | + * Cluster information will be returned by default. An optional <i>ShowDetails</i> flag can be used to retrieve detailed information about the |
| 457 | + * Cache Nodes associated with the Cache Cluster. Details include the DNS address and port for the Cache Node endpoint. |
| 458 | + * |
| 459 | + * If the cluster is in CREATING state, only cluster level information will be displayed until all of the nodes are successfully provisioned. |
| 460 | + * |
| 461 | + * If the cluster is in DELETING state, only cluster level information will be displayed. |
| 462 | + * |
| 463 | + * While adding Cache Nodes, node endpoint information and creation time for the additional nodes will not be displayed until they are |
| 464 | + * completely provisioned. The cluster lifecycle tells the customer when new nodes are AVAILABLE. |
| 465 | + * |
| 466 | + * While removing existing Cache Nodes from an cluster, endpoint information for the removed nodes will not be displayed. |
| 467 | + * |
| 468 | + * DescribeCacheClusters supports pagination. |
| 469 | + * |
| 470 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 471 | + * <li><code>CacheClusterId</code> - <code>string</code> - Optional - The user-supplied cluster identifier. If this parameter is specified, only information about that specific Cache Cluster is returned. This parameter isn't case sensitive. </li> |
| 472 | + * <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100 </li> |
| 473 | + * <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li> |
| 474 | + * <li><code>ShowCacheNodeInfo</code> - <code>boolean</code> - Optional - An optional flag that can be included in the DescribeCacheCluster request to retrieve Cache Nodes information. </li> |
| 475 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 476 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 477 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 478 | + */ |
| 479 | + public function describe_cache_clusters($opt = null) |
| 480 | + { |
| 481 | + if (!$opt) $opt = array(); |
| 482 | + |
| 483 | + return $this->authenticate('DescribeCacheClusters', $opt, $this->hostname); |
| 484 | + } |
| 485 | + |
| 486 | + /** |
| 487 | + * |
| 488 | + * Deletes a Cache Security Group. |
| 489 | + * |
| 490 | + * The specified Cache Security Group must not be associated with any Cache Clusters. |
| 491 | + * |
| 492 | + * @param string $cache_security_group_name (Required) The name of the Cache Security Group to delete. You cannot delete the default security group. |
| 493 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 494 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 495 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 496 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 497 | + */ |
| 498 | + public function delete_cache_security_group($cache_security_group_name, $opt = null) |
| 499 | + { |
| 500 | + if (!$opt) $opt = array(); |
| 501 | + $opt['CacheSecurityGroupName'] = $cache_security_group_name; |
| 502 | + |
| 503 | + return $this->authenticate('DeleteCacheSecurityGroup', $opt, $this->hostname); |
| 504 | + } |
| 505 | + |
| 506 | + /** |
| 507 | + * |
| 508 | + * Creates a new Cache Parameter Group. Cache Parameter groups control the parameters for a Cache Cluster. |
| 509 | + * |
| 510 | + * @param string $cache_parameter_group_name (Required) The name of the Cache Parameter Group. |
| 511 | + * @param string $cache_parameter_group_family (Required) The name of the Cache Parameter Group Family the Cache Parameter Group can be used with. Currently, <i>memcached1.4</i> is the only cache parameter group family supported by the service. |
| 512 | + * @param string $description (Required) The description for the Cache Parameter Group. |
| 513 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 514 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 515 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 516 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 517 | + */ |
| 518 | + public function create_cache_parameter_group($cache_parameter_group_name, $cache_parameter_group_family, $description, $opt = null) |
| 519 | + { |
| 520 | + if (!$opt) $opt = array(); |
| 521 | + $opt['CacheParameterGroupName'] = $cache_parameter_group_name; |
| 522 | + $opt['CacheParameterGroupFamily'] = $cache_parameter_group_family; |
| 523 | + $opt['Description'] = $description; |
| 524 | + |
| 525 | + return $this->authenticate('CreateCacheParameterGroup', $opt, $this->hostname); |
| 526 | + } |
| 527 | + |
| 528 | + /** |
| 529 | + * |
| 530 | + * The RebootCacheCluster API reboots some (or all) of the cache cluster nodes within a previously provisioned ElastiCache cluster. This API |
| 531 | + * results in the application of modified CacheParameterGroup parameters to the cache cluster. This action is taken as soon as possible, and |
| 532 | + * results in a momentary outage to the cache cluster during which the cache cluster status is set to rebooting. During that momentary outage |
| 533 | + * the contents of the cache (for each cache cluster node being rebooted) are lost. A CacheCluster event is created when the reboot is |
| 534 | + * completed. |
| 535 | + * |
| 536 | + * @param string $cache_cluster_id (Required) The Cache Cluster identifier. This parameter is stored as a lowercase string. |
| 537 | + * @param string|array $cache_node_ids_to_reboot (Required) A list of Cache Cluster Node ids to reboot. To reboot an entire cache cluster, specify all cache cluster node ids. Pass a string for a single value, or an indexed array for multiple values. |
| 538 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 539 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 540 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 541 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 542 | + */ |
| 543 | + public function reboot_cache_cluster($cache_cluster_id, $cache_node_ids_to_reboot, $opt = null) |
| 544 | + { |
| 545 | + if (!$opt) $opt = array(); |
| 546 | + $opt['CacheClusterId'] = $cache_cluster_id; |
| 547 | + |
| 548 | + // Required parameter |
| 549 | + $opt = array_merge($opt, CFComplexType::map(array( |
| 550 | + 'CacheNodeIdsToReboot' => (is_array($cache_node_ids_to_reboot) ? $cache_node_ids_to_reboot : array($cache_node_ids_to_reboot)) |
| 551 | + ), 'member')); |
| 552 | + |
| 553 | + return $this->authenticate('RebootCacheCluster', $opt, $this->hostname); |
| 554 | + } |
| 555 | + |
| 556 | + /** |
| 557 | + * |
| 558 | + * Revokes ingress from a CacheSecurityGroup for previously authorized EC2 Security Groups. |
| 559 | + * |
| 560 | + * @param string $cache_security_group_name (Required) The name of the Cache Security Group to revoke ingress from. |
| 561 | + * @param string $ec2_security_group_name (Required) The name of the EC2 Security Group to revoke access from. |
| 562 | + * @param string $ec2_security_group_owner_id (Required) The AWS Account Number of the owner of the security group specified in the <i>EC2SecurityGroupName</i> parameter. The AWS Access Key ID is not an acceptable value. |
| 563 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 564 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 565 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 566 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 567 | + */ |
| 568 | + public function revoke_cache_security_group_ingress($cache_security_group_name, $ec2_security_group_name, $ec2_security_group_owner_id, $opt = null) |
| 569 | + { |
| 570 | + if (!$opt) $opt = array(); |
| 571 | + $opt['CacheSecurityGroupName'] = $cache_security_group_name; |
| 572 | + $opt['EC2SecurityGroupName'] = $ec2_security_group_name; |
| 573 | + $opt['EC2SecurityGroupOwnerId'] = $ec2_security_group_owner_id; |
| 574 | + |
| 575 | + return $this->authenticate('RevokeCacheSecurityGroupIngress', $opt, $this->hostname); |
| 576 | + } |
| 577 | +} |
| 578 | + |
| 579 | + |
| 580 | +/*%******************************************************************************************%*/ |
| 581 | +// EXCEPTIONS |
| 582 | + |
| 583 | +/** |
| 584 | + * Default ElastiCache Exception. |
| 585 | + */ |
| 586 | +class ElastiCache_Exception extends Exception {} |
\ No newline at end of file |
Property changes on: trunk/extensions/OpenStackManager/aws-sdk/services/elasticache.class.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 587 | + native |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/sqs.class.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | * |
30 | 30 | * Visit <a href="http://aws.amazon.com/sqs/">http://aws.amazon.com/sqs/</a> for more information. |
31 | 31 | * |
32 | | - * @version Wed Aug 03 10:14:34 PDT 2011 |
| 32 | + * @version Tue Aug 23 12:51:53 PDT 2011 |
33 | 33 | * @license See the included NOTICE.md file for complete information. |
34 | 34 | * @copyright See the included NOTICE.md file for complete information. |
35 | 35 | * @link http://aws.amazon.com/sqs/Amazon Simple Queue Service |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/iam.class.php |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | * |
34 | 34 | * We will refer to Amazon AWS Identity and Access Management using the abbreviated form IAM. All copyrights and legal protections still apply. |
35 | 35 | * |
36 | | - * @version Wed Aug 03 10:12:08 PDT 2011 |
| 36 | + * @version Tue Aug 23 12:49:35 PDT 2011 |
37 | 37 | * @license See the included NOTICE.md file for complete information. |
38 | 38 | * @copyright See the included NOTICE.md file for complete information. |
39 | 39 | * @link http://aws.amazon.com/iam/Amazon Identity and Access Management Service |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/sts.class.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | * We will refer to Amazon AWS Security Token Service using the abbreviated form STS, and to Amazon Identity and Access Management using the |
37 | 37 | * abbreviated form IAM. All copyrights and legal protections still apply. |
38 | 38 | * |
39 | | - * @version Wed Aug 03 10:14:57 PDT 2011 |
| 39 | + * @version Tue Aug 23 12:52:18 PDT 2011 |
40 | 40 | * @license See the included NOTICE.md file for complete information. |
41 | 41 | * @copyright See the included NOTICE.md file for complete information. |
42 | 42 | * @link http://aws.amazon.com/sts/AWS Secure Token Service |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/ec2.class.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | * |
29 | 29 | * Visit <a href="http://aws.amazon.com/ec2/">http://aws.amazon.com/ec2/</a> for more information. |
30 | 30 | * |
31 | | - * @version Wed Aug 03 10:10:05 PDT 2011 |
| 31 | + * @version Tue Aug 23 12:47:35 PDT 2011 |
32 | 32 | * @license See the included NOTICE.md file for complete information. |
33 | 33 | * @copyright See the included NOTICE.md file for complete information. |
34 | 34 | * @link http://aws.amazon.com/ec2/Amazon Elastic Compute Cloud |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/elasticbeanstalk.class.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | * |
37 | 37 | * </ul> |
38 | 38 | * |
39 | | - * @version Wed Aug 03 10:09:34 PDT 2011 |
| 39 | + * @version Tue Aug 23 12:47:06 PDT 2011 |
40 | 40 | * @license See the included NOTICE.md file for complete information. |
41 | 41 | * @copyright See the included NOTICE.md file for complete information. |
42 | 42 | * @link http://aws.amazon.com/elasticbeanstalk/AWS Elastic Beanstalk |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/importexport.class.php |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | * Internet. For large data sets, AWS Import/Export is often faster than Internet transfer and more cost effective than upgrading your |
24 | 24 | * connectivity. |
25 | 25 | * |
26 | | - * @version Wed Aug 03 10:12:39 PDT 2011 |
| 26 | + * @version Tue Aug 23 12:50:02 PDT 2011 |
27 | 27 | * @license See the included NOTICE.md file for complete information. |
28 | 28 | * @copyright See the included NOTICE.md file for complete information. |
29 | 29 | * @link http://aws.amazon.com/importexport/Amazon Import/Export Service |
Index: trunk/extensions/OpenStackManager/aws-sdk/services/emr.class.php |
— | — | @@ -16,10 +16,14 @@ |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * |
20 | | - * This is the Amazon Elastic MapReduce API Reference Guide. This guide is for programmers who need detailed information about the Amazon |
21 | | - * Elastic MapReduce APIs. |
| 20 | + * This is the <i>Amazon Elastic MapReduce API Reference</i>. This guide provides descriptions and samples of the Amazon Elastic MapReduce |
| 21 | + * APIs. |
22 | 22 | * |
23 | | - * @version Tue Apr 05 15:19:55 PDT 2011 |
| 23 | + * Amazon Elastic MapReduce is a web service that makes it easy to process large amounts of data efficiently. Elastic MapReduce uses Hadoop |
| 24 | + * processing combined with several AWS products to do tasks such as web indexing, data mining, log file analysis, machine learning, scientific |
| 25 | + * simulation, and data warehousing. |
| 26 | + * |
| 27 | + * @version Tue Aug 23 12:49:06 PDT 2011 |
24 | 28 | * @license See the included NOTICE.md file for complete information. |
25 | 29 | * @copyright See the included NOTICE.md file for complete information. |
26 | 30 | * @link http://aws.amazon.com/elasticmapreduce/Amazon Elastic MapReduce |
— | — | @@ -95,12 +99,16 @@ |
96 | 100 | |
97 | 101 | if (!$key && !defined('AWS_KEY')) |
98 | 102 | { |
| 103 | + // @codeCoverageIgnoreStart |
99 | 104 | throw new EMR_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.'); |
| 105 | + // @codeCoverageIgnoreEnd |
100 | 106 | } |
101 | 107 | |
102 | 108 | if (!$secret_key && !defined('AWS_SECRET_KEY')) |
103 | 109 | { |
| 110 | + // @codeCoverageIgnoreStart |
104 | 111 | throw new EMR_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.'); |
| 112 | + // @codeCoverageIgnoreEnd |
105 | 113 | } |
106 | 114 | |
107 | 115 | return parent::__construct($key, $secret_key); |
— | — | @@ -111,29 +119,34 @@ |
112 | 120 | // SERVICE METHODS |
113 | 121 | |
114 | 122 | /** |
| 123 | + * |
115 | 124 | * AddInstanceGroups adds an instance group to a running cluster. |
116 | 125 | * |
| 126 | + * @param array $instance_groups (Required) Instance Groups to add. <ul> |
| 127 | + * <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul> |
| 128 | + * <li><code>Name</code> - <code>string</code> - Optional - Friendly name given to the instance group. </li> |
| 129 | + * <li><code>Market</code> - <code>string</code> - Optional - Market type of the Amazon EC2 instances used to create a cluster node. [Allowed values: <code>ON_DEMAND</code>, <code>SPOT</code>]</li> |
| 130 | + * <li><code>InstanceRole</code> - <code>string</code> - Required - The role of the instance group in the cluster. [Allowed values: <code>MASTER</code>, <code>CORE</code>, <code>TASK</code>]</li> |
| 131 | + * <li><code>BidPrice</code> - <code>string</code> - Optional - Bid price for each Amazon EC2 instance in the instance group when launching nodes as Spot Instances, expressed in USD. </li> |
| 132 | + * <li><code>InstanceType</code> - <code>string</code> - Required - The Amazon EC2 instance type for all instances in the instance group. </li> |
| 133 | + * <li><code>InstanceCount</code> - <code>integer</code> - Required - Target number of instances for the instance group. </li> |
| 134 | + * </ul></li> |
| 135 | + * </ul> |
117 | 136 | * @param string $job_flow_id (Required) Job flow in which to add the instance groups. |
118 | | - * @param array $instance_groups (Required) Instance Groups to add. Takes an indexed array of associative arrays of parameters. Each associative array can have the following keys: <ul> |
119 | | - * <li><code>Name</code> - <code>string</code> - Optional - Friendly name given to the instance group.</li> |
120 | | - * <li><code>Market</code> - <code>string</code> - Required - Market type of the Amazon EC2 instances used to create a cluster node. [Allowed values: <code>ON_DEMAND</code>]</li> |
121 | | - * <li><code>InstanceRole</code> - <code>string</code> - Required - The role of the instance group in the cluster. [Allowed values: <code>MASTER</code>, <code>CORE</code>, <code>TASK</code>]</li> |
122 | | - * <li><code>InstanceType</code> - <code>string</code> - Required - The Amazon EC2 instance type for all instances in the instance group.</li> |
123 | | - * <li><code>InstanceCount</code> - <code>integer</code> - Required - Target number of instances for the instance group.</li></ul> |
124 | 137 | * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
125 | | - * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <php:curl_setopt()>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
126 | | - * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This is useful for manually-managed batch requests.</li></ul> |
| 138 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 139 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
127 | 140 | * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
128 | 141 | */ |
129 | | - public function add_instance_groups($job_flow_id, $instance_groups, $opt = null) |
| 142 | + public function add_instance_groups($instance_groups, $job_flow_id, $opt = null) |
130 | 143 | { |
131 | 144 | if (!$opt) $opt = array(); |
132 | | - $opt['JobFlowId'] = $job_flow_id; |
133 | 145 | |
134 | 146 | // Required parameter |
135 | 147 | $opt = array_merge($opt, CFComplexType::map(array( |
136 | 148 | 'InstanceGroups' => (is_array($instance_groups) ? $instance_groups : array($instance_groups)) |
137 | 149 | ), 'member')); |
| 150 | + $opt['JobFlowId'] = $job_flow_id; |
138 | 151 | |
139 | 152 | return $this->authenticate('AddInstanceGroups', $opt, $this->hostname); |
140 | 153 | } |
— | — | @@ -142,6 +155,12 @@ |
143 | 156 | * |
144 | 157 | * AddJobFlowSteps adds new steps to a running job flow. A maximum of 256 steps are allowed in each job flow. |
145 | 158 | * |
| 159 | + * If your job flow is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You |
| 160 | + * can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries |
| 161 | + * directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, go to <a |
| 162 | + * href="http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/AddMoreThan256Steps.html">Add More than 256 Steps to a Job |
| 163 | + * Flow</a> in the <i>Amazon Elastic MapReduce Developer's Guide</i>. |
| 164 | + * |
146 | 165 | * A step specifies the location of a JAR file stored either on the master node of the job flow or in Amazon S3. Each step is performed by the |
147 | 166 | * main function of the main class of the JAR file. The main class can be specified either in the manifest of the JAR or by using the |
148 | 167 | * MainFunction parameter of the step. |
— | — | @@ -149,9 +168,9 @@ |
150 | 169 | * Elastic MapReduce executes each step in the order listed. For a step to be considered complete, the main function must exit with a zero |
151 | 170 | * exit code and all Hadoop jobs started while the step was running must have completed and run successfully. |
152 | 171 | * |
153 | | - * You can only add steps to a job flow that is in one of the following states: STARTING, BOOTSTAPPING, RUNNING, or WAITING. |
| 172 | + * You can only add steps to a job flow that is in one of the following states: STARTING, BOOTSTRAPPING, RUNNING, or WAITING. |
154 | 173 | * |
155 | | - * @param string $job_flow_id (Required) A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows . |
| 174 | + * @param string $job_flow_id (Required) A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows. |
156 | 175 | * @param array $steps (Required) A list of StepConfig to be executed by the job flow. <ul> |
157 | 176 | * <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul> |
158 | 177 | * <li><code>Name</code> - <code>string</code> - Required - The name of the job flow step. </li> |
— | — | @@ -170,7 +189,7 @@ |
171 | 190 | * </ul></li> |
172 | 191 | * </ul> |
173 | 192 | * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
174 | | - * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <php:curl_setopt()>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 193 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
175 | 194 | * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
176 | 195 | * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
177 | 196 | */ |
— | — | @@ -195,7 +214,7 @@ |
196 | 215 | * |
197 | 216 | * @param string|array $job_flow_ids (Required) A list of job flows to be shutdown. Pass a string for a single value, or an indexed array for multiple values. |
198 | 217 | * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
199 | | - * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <php:curl_setopt()>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 218 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
200 | 219 | * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
201 | 220 | * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
202 | 221 | */ |
— | — | @@ -222,8 +241,8 @@ |
223 | 242 | * |
224 | 243 | * <ul> <li>Job flows created and completed in the last two weeks</li> |
225 | 244 | * |
226 | | - * <li> Job flows created within the last two months that are in one of the following states: <code>RUNNING</code> , <code>WAITING</code> , |
227 | | - * <code>SHUTTING_DOWN</code> , <code>STARTING</code> </li> |
| 245 | + * <li> Job flows created within the last two months that are in one of the following states: <code>RUNNING</code>, <code>WAITING</code>, |
| 246 | + * <code>SHUTTING_DOWN</code>, <code>STARTING</code> </li> |
228 | 247 | * |
229 | 248 | * </ul> |
230 | 249 | * |
— | — | @@ -234,7 +253,7 @@ |
235 | 254 | * <li><code>CreatedBefore</code> - <code>string</code> - Optional - Return only job flows created before this date and time. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li> |
236 | 255 | * <li><code>JobFlowIds</code> - <code>string|array</code> - Optional - Return only job flows whose job flow ID is contained in this list. Pass a string for a single value, or an indexed array for multiple values. </li> |
237 | 256 | * <li><code>JobFlowStates</code> - <code>string|array</code> - Optional - Return only job flows whose state is contained in this list. Pass a string for a single value, or an indexed array for multiple values. </li> |
238 | | - * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <php:curl_setopt()>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 257 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
239 | 258 | * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
240 | 259 | * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
241 | 260 | */ |
— | — | @@ -277,15 +296,61 @@ |
278 | 297 | |
279 | 298 | /** |
280 | 299 | * |
| 300 | + * SetTerminationProtection locks a job flow so the Amazon EC2 instances in the cluster cannot be terminated by user intervention, an API |
| 301 | + * call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling |
| 302 | + * SetTerminationProtection on a job flow is analogous to calling the Amazon EC2 DisableAPITermination API on all of the EC2 instances in a |
| 303 | + * cluster. |
| 304 | + * |
| 305 | + * SetTerminationProtection is used to prevent accidental termination of a job flow and to ensure that in the event of an error, the instances |
| 306 | + * will persist so you can recover any data stored in their ephemeral instance storage. |
| 307 | + * |
| 308 | + * To terminate a job flow that has been locked by setting SetTerminationProtection to <code>true</code>, you must first unlock the job flow |
| 309 | + * by a subsequent call to SetTerminationProtection in which you set the value to <code>false</code>. |
| 310 | + * |
| 311 | + * For more information, go to <a |
| 312 | + * href="http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/UsingEMR_TerminationProtection.html">Protecting a Job Flow |
| 313 | + * from Termination</a> in the <i>Amazon Elastic MapReduce Developer's Guide.</i> |
| 314 | + * |
| 315 | + * @param string|array $job_flow_ids (Required) A list of strings that uniquely identify the job flows to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows . Pass a string for a single value, or an indexed array for multiple values. |
| 316 | + * @param boolean $termination_protected (Required) A Boolean that indicates whether to protect the job flow and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error. |
| 317 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 318 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 319 | + * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
| 320 | + * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
| 321 | + */ |
| 322 | + public function set_termination_protection($job_flow_ids, $termination_protected, $opt = null) |
| 323 | + { |
| 324 | + if (!$opt) $opt = array(); |
| 325 | + |
| 326 | + // Required parameter |
| 327 | + $opt = array_merge($opt, CFComplexType::map(array( |
| 328 | + 'JobFlowIds' => (is_array($job_flow_ids) ? $job_flow_ids : array($job_flow_ids)) |
| 329 | + ), 'member')); |
| 330 | + $opt['TerminationProtected'] = $termination_protected; |
| 331 | + |
| 332 | + return $this->authenticate('SetTerminationProtection', $opt, $this->hostname); |
| 333 | + } |
| 334 | + |
| 335 | + /** |
| 336 | + * |
281 | 337 | * RunJobFlow creates and starts running a new job flow. The job flow will run the steps specified. Once the job flow completes, the cluster |
282 | 338 | * is stopped and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3. |
283 | | - * If the JobFlowInstancesDetail : KeepJobFlowAliveWhenNoSteps parameter is set to <code>TRUE</code>, the job flow will transition to the |
284 | | - * WAITING state rather than shutting down once the steps have completed. |
| 339 | + * If the JobFlowInstancesDetail <code>KeepJobFlowAliveWhenNoSteps</code> parameter is set to <code>TRUE</code>, the job flow will transition |
| 340 | + * to the WAITING state rather than shutting down once the steps have completed. |
285 | 341 | * |
| 342 | + * For additional protection, you can set the JobFlowInstancesDetail <code>TerminationProtected</code> parameter to <code>TRUE</code> to lock |
| 343 | + * the job flow and prevent it from being terminated by API call, user intervention, or in the event of a job flow error. |
| 344 | + * |
286 | 345 | * A maximum of 256 steps are allowed in each job flow. |
287 | 346 | * |
288 | | - * For long running job flows, we recommended that you periodically store your results. |
| 347 | + * If your job flow is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You |
| 348 | + * can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries |
| 349 | + * directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, go to <a |
| 350 | + * href="http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/AddMoreThan256Steps.html">Add More than 256 Steps to a Job |
| 351 | + * Flow</a> in the <i>Amazon Elastic MapReduce Developer's Guide</i>. |
289 | 352 | * |
| 353 | + * For long running job flows, we recommend that you periodically store your results. |
| 354 | + * |
290 | 355 | * @param string $name (Required) The name of the job flow. |
291 | 356 | * @param array $instances (Required) A specification of the number and type of Amazon EC2 instances on which to run the job flow. <ul> |
292 | 357 | * <li><code>MasterInstanceType</code> - <code>string</code> - Optional - The EC2 instance type of the master node. </li> |
— | — | @@ -294,8 +359,9 @@ |
295 | 360 | * <li><code>InstanceGroups</code> - <code>array</code> - Optional - Configuration for the job flow's instance groups. <ul> |
296 | 361 | * <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul> |
297 | 362 | * <li><code>Name</code> - <code>string</code> - Optional - Friendly name given to the instance group. </li> |
298 | | - * <li><code>Market</code> - <code>string</code> - Required - Market type of the Amazon EC2 instances used to create a cluster node. [Allowed values: <code>ON_DEMAND</code>]</li> |
| 363 | + * <li><code>Market</code> - <code>string</code> - Optional - Market type of the Amazon EC2 instances used to create a cluster node. [Allowed values: <code>ON_DEMAND</code>, <code>SPOT</code>]</li> |
299 | 364 | * <li><code>InstanceRole</code> - <code>string</code> - Required - The role of the instance group in the cluster. [Allowed values: <code>MASTER</code>, <code>CORE</code>, <code>TASK</code>]</li> |
| 365 | + * <li><code>BidPrice</code> - <code>string</code> - Optional - Bid price for each Amazon EC2 instance in the instance group when launching nodes as Spot Instances, expressed in USD. </li> |
300 | 366 | * <li><code>InstanceType</code> - <code>string</code> - Required - The Amazon EC2 instance type for all instances in the instance group. </li> |
301 | 367 | * <li><code>InstanceCount</code> - <code>integer</code> - Required - Target number of instances for the instance group. </li> |
302 | 368 | * </ul></li> |
— | — | @@ -305,6 +371,7 @@ |
306 | 372 | * <li><code>AvailabilityZone</code> - <code>string</code> - Required - The Amazon EC2 Availability Zone for the job flow. </li> |
307 | 373 | * </ul></li> |
308 | 374 | * <li><code>KeepJobFlowAliveWhenNoSteps</code> - <code>boolean</code> - Optional - Specifies whether the job flow should terminate after completing all steps. </li> |
| 375 | + * <li><code>TerminationProtected</code> - <code>boolean</code> - Optional - Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error. </li> |
309 | 376 | * <li><code>HadoopVersion</code> - <code>string</code> - Optional - Specifies the Hadoop version for the job flow. Valid inputs are "0.18" or "0.20". </li> |
310 | 377 | * </ul> |
311 | 378 | * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
— | — | @@ -331,12 +398,12 @@ |
332 | 399 | * <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul> |
333 | 400 | * <li><code>Name</code> - <code>string</code> - Required - The name of the bootstrap action. </li> |
334 | 401 | * <li><code>ScriptBootstrapAction</code> - <code>array</code> - Required - The script run by the bootstrap action. Takes an associative array of parameters that can have the following keys: <ul> |
335 | | - * <li><code>Path</code> - <code>string</code> - Optional - Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system. </li> |
| 402 | + * <li><code>Path</code> - <code>string</code> - Required - Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system. </li> |
336 | 403 | * <li><code>Args</code> - <code>string|array</code> - Optional - A list of command line arguments to pass to the bootstrap action script. Pass a string for a single value, or an indexed array for multiple values. </li> |
337 | 404 | * </ul></li> |
338 | 405 | * </ul></li> |
339 | 406 | * </ul></li> |
340 | | - * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <php:curl_setopt()>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 407 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
341 | 408 | * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
342 | 409 | * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
343 | 410 | */ |
— | — | @@ -391,7 +458,7 @@ |
392 | 459 | * <li><code>InstanceCount</code> - <code>integer</code> - Required - Target size for the instance group. </li> |
393 | 460 | * </ul></li> |
394 | 461 | * </ul></li> |
395 | | - * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <php:curl_setopt()>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
| 462 | + * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li> |
396 | 463 | * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul> |
397 | 464 | * @return CFResponse A <CFResponse> object containing a parsed HTTP response. |
398 | 465 | */ |
Index: trunk/extensions/OpenStackManager/aws-sdk/_docs/CHANGELOG.md |
— | — | @@ -1,3 +1,24 @@ |
| 2 | +# Changelog: 1.4.1 "Sephiroth" |
| 3 | +<http://finalfantasy.wikia.com/wiki/Sephiroth> |
| 4 | + |
| 5 | +## Service Classes |
| 6 | +### AmazonElastiCache |
| 7 | +* **New:** Support for Amazon ElastiCache has been added to the SDK. |
| 8 | + |
| 9 | +### AmazonEMR |
| 10 | +* **New:** Support for Hadoop Bootstrap Actions has been added to the SDK. |
| 11 | +* **New:** Support for Amazon Elastic MapReduce on Spot Instances has been added to the SDK. |
| 12 | +* **New:** Support for Termination Protection has been added to the SDK. |
| 13 | +* **Changed:** For the <code>add_instance_groups()</code> method, the <code>$instance_groups</code> and <code>$job_flow_id</code> parameters have been reversed. |
| 14 | + |
| 15 | +## Utility Classes |
| 16 | +### CFHadoopBootstrap |
| 17 | +* **New:** The `CFHadoopBootstrap` class has been added to the SDK. Simplifies the process of working with Hadoop system and daemon configurations in Amazon EMR. |
| 18 | +* **New:** This class extends from the `CFHadoopBase` class. |
| 19 | + |
| 20 | + |
| 21 | +---- |
| 22 | + |
2 | 23 | # Changelog: 1.4 "Rikku" |
3 | 24 | <http://finalfantasy.wikia.com/wiki/Rikku> |
4 | 25 | |
Index: trunk/extensions/OpenStackManager/aws-sdk/sdk.class.php |
— | — | @@ -125,9 +125,9 @@ |
126 | 126 | // INTERMEDIARY CONSTANTS |
127 | 127 | |
128 | 128 | define('CFRUNTIME_NAME', 'aws-sdk-php'); |
129 | | -define('CFRUNTIME_VERSION', '1.4'); |
| 129 | +define('CFRUNTIME_VERSION', '1.4.1'); |
130 | 130 | // define('CFRUNTIME_BUILD', gmdate('YmdHis', filemtime(__FILE__))); // @todo: Hardcode for release. |
131 | | -define('CFRUNTIME_BUILD', '20110803172558'); |
| 131 | +define('CFRUNTIME_BUILD', '20110823204245'); |
132 | 132 | define('CFRUNTIME_USERAGENT', CFRUNTIME_NAME . '/' . CFRUNTIME_VERSION . ' PHP/' . PHP_VERSION . ' ' . str_replace(' ', '_', php_uname('s')) . '/' . str_replace(' ', '_', php_uname('r')) . ' Arch/' . php_uname('m') . ' SAPI/' . php_sapi_name() . ' Integer/' . PHP_INT_MAX . ' Build/' . CFRUNTIME_BUILD . __aws_sdk_ua_callback()); |
133 | 133 | |
134 | 134 | |
— | — | @@ -415,7 +415,8 @@ |
416 | 416 | // Use 'em if we've got 'em |
417 | 417 | if ($key && $secret_key && $token) |
418 | 418 | { |
419 | | - $this->__construct($key, $secret_key); |
| 419 | + $this->key = $key; |
| 420 | + $this->secret_key = $secret_key; |
420 | 421 | $this->auth_token = $token; |
421 | 422 | return true; |
422 | 423 | } |
— | — | @@ -458,20 +459,12 @@ |
459 | 460 | $this->auth_token = $session_credentials['SessionToken']; |
460 | 461 | |
461 | 462 | // If both a key and secret key are passed in, use those. |
462 | | - if ($session_credentials['AccessKeyId'] && $session_credentials['SecretAccessKey']) |
| 463 | + if (isset($session_credentials['AccessKeyId']) && isset($session_credentials['SecretAccessKey'])) |
463 | 464 | { |
464 | 465 | $this->key = $session_credentials['AccessKeyId']; |
465 | 466 | $this->secret_key = $session_credentials['SecretAccessKey']; |
466 | 467 | return true; |
467 | 468 | } |
468 | | - // If neither are passed in, look for the constants instead. |
469 | | - elseif (defined('AWS_KEY') && defined('AWS_SECRET_KEY')) |
470 | | - { |
471 | | - $this->key = AWS_KEY; |
472 | | - $this->secret_key = AWS_SECRET_KEY; |
473 | | - return true; |
474 | | - } |
475 | | - |
476 | 469 | // Otherwise set the values to blank and return false. |
477 | 470 | else |
478 | 471 | { |
— | — | @@ -480,6 +473,13 @@ |
481 | 474 | } |
482 | 475 | } |
483 | 476 | |
| 477 | + /** |
| 478 | + * The callback function that is executed while caching the session credentials. |
| 479 | + * |
| 480 | + * @param string $key (Optional) Your AWS key, or a session key. If blank, it will look for the <code>AWS_KEY</code> constant. |
| 481 | + * @param string $secret_key (Optional) Your AWS secret key, or a session secret key. If blank, it will look for the <code>AWS_SECRET_KEY</code> constant. |
| 482 | + * @return mixed The data to be cached or null. |
| 483 | + */ |
484 | 484 | public function cache_token($key, $secret_key) |
485 | 485 | { |
486 | 486 | $token = new AmazonSTS($key, $secret_key); |
— | — | @@ -1365,7 +1365,7 @@ |
1366 | 1366 | case 'deflate': |
1367 | 1367 | if (strpos($headers['_info']['url'], 'monitoring.') !== false) |
1368 | 1368 | { |
1369 | | - // CloudWatch incorrectly does nothing when they say deflate. |
| 1369 | + // CloudWatchWatch incorrectly does nothing when they say deflate. |
1370 | 1370 | continue; |
1371 | 1371 | } |
1372 | 1372 | else |
Index: trunk/extensions/OpenStackManager/aws-sdk/utilities/hadoopbootstrap.class.php |
— | — | @@ -0,0 +1,127 @@ |
| 2 | +<?php |
| 3 | +/* |
| 4 | + * Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 5 | + * |
| 6 | + * Licensed under the Apache License, Version 2.0 (the "License"). |
| 7 | + * You may not use this file except in compliance with the License. |
| 8 | + * A copy of the License is located at |
| 9 | + * |
| 10 | + * http://aws.amazon.com/apache2.0 |
| 11 | + * |
| 12 | + * or in the "license" file accompanying this file. This file is distributed |
| 13 | + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 14 | + * express or implied. See the License for the specific language governing |
| 15 | + * permissions and limitations under the License. |
| 16 | + */ |
| 17 | + |
| 18 | + |
| 19 | +/*%******************************************************************************************%*/ |
| 20 | +// CLASS |
| 21 | + |
| 22 | +/** |
| 23 | + * Contains a set of pre-built Amazon EMR Hadoop Bootstrap Actions. |
| 24 | + * |
| 25 | + * @version 2011.05.03 |
| 26 | + * @license See the included NOTICE.md file for more information. |
| 27 | + * @copyright See the included NOTICE.md file for more information. |
| 28 | + * @link http://aws.amazon.com/php/ PHP Developer Center |
| 29 | + * @link http://hadoop.apache.org Apache Hadoop |
| 30 | + */ |
| 31 | +class CFHadoopBootstrap extends CFHadoopBase |
| 32 | +{ |
| 33 | + // Config file types |
| 34 | + const CONFIG_SITE = 'S'; |
| 35 | + const CONFIG_DEFAULT = 'D'; |
| 36 | + const CONFIG_CORE = 'C'; |
| 37 | + const CONFIG_HDFS = 'H'; |
| 38 | + const CONFIG_MAPREDUCE = 'M'; |
| 39 | + |
| 40 | + // Daemon types |
| 41 | + const DAEMON_NAME_NODE = 'namenode'; |
| 42 | + const DAEMON_DATA_NODE = 'datanode'; |
| 43 | + const DAEMON_JOB_TRACKER = 'jobtracker'; |
| 44 | + const DAEMON_TASK_TRACKER = 'tasktracker'; |
| 45 | + const DAEMON_CLIENT = 'client'; |
| 46 | + |
| 47 | + /** |
| 48 | + * Create a new run-if bootstrap action which lets you conditionally run bootstrap actions. |
| 49 | + * |
| 50 | + * @param string $condition (Required) The condition to evaluate. If <code>true</code>, the bootstrap action executes. |
| 51 | + * @param array $args (Optional) An indexed array of arguments to pass to the script. |
| 52 | + * @return array A configuration set to be provided when running a job flow. |
| 53 | + */ |
| 54 | + public static function run_if($condition, $args = null) |
| 55 | + { |
| 56 | + if (!$args) $args = array(); |
| 57 | + $args = is_array($args) ? $args : array($args); |
| 58 | + |
| 59 | + return self::script_runner('s3://us-east-1.elasticmapreduce/bootstrap-actions/run-if', $args); |
| 60 | + } |
| 61 | + |
| 62 | + /** |
| 63 | + * Specify options to merge with Hadoop's default configuration. |
| 64 | + * |
| 65 | + * @param string $file (Required) The Hadoop configuration file to merge with. [Allowed values: <code>CFHadoopBootstrap::CONFIG_SITE</code>, <code>CFHadoopBootstrap::CONFIG_DEFAULT</code>, <code>CFHadoopBootstrap::CONFIG_CORE</code>, <code>CFHadoopBootstrap::CONFIG_HDFS</code>, <code>CFHadoopBootstrap::CONFIG_MAPREDUCE</code>] |
| 66 | + * @param string|array $config (Required) This can either be an XML file in S3 (as <code>s3://bucket/path</code>), or an associative array of key-value pairs. |
| 67 | + * @return array A configuration set to be provided when running a job flow. |
| 68 | + */ |
| 69 | + public static function configure($file, $config) |
| 70 | + { |
| 71 | + $args = array(); |
| 72 | + $file_arg = '-' . $file; |
| 73 | + |
| 74 | + if (is_string($config)) |
| 75 | + { |
| 76 | + $args[] = $file_arg; |
| 77 | + $args[] = $config; |
| 78 | + } |
| 79 | + elseif (is_array($config)) |
| 80 | + { |
| 81 | + foreach ($config as $key => $value) |
| 82 | + { |
| 83 | + $args[] = $file_arg; |
| 84 | + $args[] = $key . '=' . $value; |
| 85 | + } |
| 86 | + } |
| 87 | + |
| 88 | + return self::script_runner('s3://us-east-1.elasticmapreduce/bootstrap-actions/configure-hadoop', $args); |
| 89 | + } |
| 90 | + |
| 91 | + /** |
| 92 | + * Create a new bootstrap action which lets you configure Hadoop's daemons. The options are written to |
| 93 | + * the <code>hadoop-user-env.sh</code> file. |
| 94 | + * |
| 95 | + * @param string $daemon_type (Required) The Hadoop daemon to configure. |
| 96 | + * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul> |
| 97 | + * <li><code>HeapSize</code> - <code>integer</code> - Optional - The requested heap size of the daemon, in megabytes.</li> |
| 98 | + * <li><code>CLIOptions</code> - <code>string</code> - Optional - Additional Java command line arguments to pass to the daemon.</li> |
| 99 | + * <li><code>Replace</code> - <code>boolean</code> - Optional - Whether or not the file should be replaced. A value of <code>true</code> will replace the existing configuration file. A value of <code>false</code> will append the options to the configuration file.</li></ul> |
| 100 | + * @return array A configuration set to be provided when running a job flow. |
| 101 | + */ |
| 102 | + public static function daemon($daemon_type, $opt = null) |
| 103 | + { |
| 104 | + if (!$opt) $opt = array(); |
| 105 | + $args = array(); |
| 106 | + |
| 107 | + foreach ($opt as $key => $value) |
| 108 | + { |
| 109 | + switch ($key) |
| 110 | + { |
| 111 | + case 'HeapSize': |
| 112 | + $args[] = '--' . $daemon_type . '-heap-size=' . $value; |
| 113 | + break; |
| 114 | + case 'CLIOptions': |
| 115 | + $args[] = '--' . $daemon_type . '-opts="' . $value . '"'; |
| 116 | + break; |
| 117 | + case 'Replace': |
| 118 | + if ((is_string($value) && $value === 'true') || (is_bool($value) && $value === true)) |
| 119 | + { |
| 120 | + $args[] = '--replace'; |
| 121 | + } |
| 122 | + break; |
| 123 | + } |
| 124 | + } |
| 125 | + |
| 126 | + return self::script_runner('s3://us-east-1.elasticmapreduce/bootstrap-actions/configure-daemons', $args); |
| 127 | + } |
| 128 | +} |
Property changes on: trunk/extensions/OpenStackManager/aws-sdk/utilities/hadoopbootstrap.class.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 129 | + native |